npm install --global yarn
Clone the COSMOS Playwright repo
git clone https://github.com/OpenC3/cosmos-playwright
Install Playwright and dependencies
cosmos-playwright % yarn install
cosmos % openc3.sh start
Open COSMOS in your browser. At the login screen, set the password to “password”.
Run tests (Note the –headed option visually displays tests, leave it off to run in the background)
cosmos-playwright % yarn playwright test --project=chromium --headed
[Optional] Fix istanbul/nyc coverage source lookups (use
fixwindowsif not on Linux).
Tests will run successfully without this step and you will get coverage statistics, but line-by-line coverage won’t work.
cosmos-playwright % yarn fixlinux
Generate code coverage
cosmos-playwright % yarn coverage
Code coverage reports can be viewed at
Navigate to cosmos/openc3 folder. Run the command:
cosmos/openc3 % rake build cosmos/openc3 % bundle exec rspec
Code coverage reports can be found at