Coder Social home page Coder Social logo

utc-chat / patience Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matrix-org/patience

0.0 0.0 0.0 1.22 MB

Full stack integration testing for Matrix clients and servers

License: Apache License 2.0

JavaScript 9.26% TypeScript 83.70% CSS 2.78% HTML 0.61% Dockerfile 0.71% Shell 2.93%

patience's Introduction

Patience

CI Matrix

Full stack integration testing for Matrix clients and servers

Features

  • Any permutation of supported clients can be tested together
  • Client specifics are hidden by default (but still accessible) so tests can target many clients without modification
  • Tests written in TypeScript
  • Report mode gives a quick summary of results in your terminal
  • Interactive mode allows you to try out and debug the clients in your browser
  • Builds on top of Complement's homerunner API
  • Test harness displays all clients together on one page

Supported environments

Patience aims to support testing different combinations of Matrix clients and servers in a unified environment.

Element Web and Hydrogen are the currently supported clients. Anything that fits in an iframe should be easy to add. Tools such as Appetize could be used to add mobile clients.

Synapse and Dendrite are the currently supported homeservers.

Usage

Setup is currently a bit manual, as this project is just getting started. If you have suggestions on how to improve setup, please file an issue.

To get started with Patience in your project, first collect the following bits and bobs:

  • Docker
  • Go
  • Node.js
  • homerunner from Complement
    • go install github.com/matrix-org/complement/cmd/homerunner@latest
  • One or more Complement-ready homeserver images
  • Chrome
    • We plan to switch to Playwright in the future to support additional browsers

Create a directory to hold your tests and add Patience:

npm add @matrix-org/patience --save-dev

Add a test, perhaps by copying hello.ts. At a minimum, you should call orchestrate to set up servers, clients, and rooms for your test. Most likely you'll want to actually test something too.

To run your tests in reporting mode:

npx patience '*.ts'

You should see:

Finished running tests, all tests passed! ๐ŸŽ‰

To run your tests in interactive mode:

npx patience '*.ts' -- --manual

This will start a server at localhost:8000 which you can navigate to in your browser. Click on one of listed test files to watch the test run. You can interact with the clients, timeline, etc. The clients remain after for exploration until you stop the server.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.