Updating test coverage
How to update test coverage ?
Last updated
How to update test coverage ?
Last updated
Make sure you go through the steps to add nyc to your project before this.
Hypertest allows you to update coverage of the tests that have so far been recorded. This is run using a cli command. Running this will spawn your application instance, hit all the test cases recorded so far and store the code coverage generated.
Make sure that you checkout to your master (Or the branch that is your baseline for recording requests) and have no local changes before you run this command. We want to store the lines covered on master.
Create ht cli config file. This is the same that is used to run cli test.
Your app will be spawned using the command you give in the cli config. Make sure you run your app using nyc in that command. (Don't run the cli process with nyc, just your app)
Example
Change the appStartCommand
and appStartCommandArgs
( inside your cli config ) to the what you created in step 2.
Example:
Run the cli command to update coverage
Please complete the CLI token generation as mentioned .