Autolabcli tests - AutolabJS/autolabcli GitHub Wiki
This page details the steps to run the unit / integration / functional tests on Autolabcli. The instructions also include steps required to upload the code coverage to different websites.
To run unit tests-
> npm run unit
To upload unit test coverage report-
> CODECOV_TOKEN=<token> npm run post-unit
To run integration tests coverage-
> npm run integration
To upload integration test coverage report-
> CODECOV_TOKEN=<token> npm run post-integration
Feature tests connect to the deployment server for testing. Hence it is important to have correct server preferences before running the tests. The see the current preferences run -
autolabjs prefs show.
If the server preferences are not same as the deployment server, change the preferences using -
autolabjs prefs changeserver --host <host> --port <port>
Also the following steps have to be completed before running the feature test suite:
- Create the following users on the
Gitlab
server with corresponding passwords :- Username and Name:
AutolabJS_Tester
; Password:autolabjs123
- Username:
testuser
; Password: (can be anything) - Username:
lab_author
; Password: (can be anything)
- Username and Name:
- Create a
test
lab and update the same on lab_author to be evaluated, in java.
Then feature tests can be run using -
> npm run feature
- To upload feature test coverage report-
> CODECOV_TOKEN=<token> npm run post-feature
- CODECOV_TOKEN is required only when you are running the coverage report commands in the local environment.
- Feature tests and its coverage report commands must be manually run.