Modified coverage with TIA

TIA is our feature which allows you to run only the tests that check the modified code

For seeing the TIA in action we've prepared this guide for you

1. Run the BTQ-CI with long test.

We've prepared a seperate test just for the TIA in pytest called long test which takes ~8 min. It's the same exact tests as pytests just with some wait time. To do it go to the Jenkins and run BTQ-CI:

Jenkins

Go public -> run with parameters

BTQ-CI run with parameters

Uncheck everything except "long_test" (You can add the others but no need). You can add a build name then click run.

Wait for the pipeline to finish then check the results on our dashboard

Dashboard with first run

You can see it takes ~8 min to run all 8 tests and get 67% coverage.

2. Turn TIA on

In the dashboard go to "Test Optimization"->"Build Breakdown" in the Navigation bar.

Go to the Boutique app with the long_test test stage and select public branch, then click "TIA Configuration"

Boutique in Test optimization page

Locate the branch and then click on the switch

It should like this

TIA on

The potential time saved will be different from the one you have now

3. Change the Boutique code (make pull request)

We've already prepared a another branch for you called changed-branch that contains a change that will effect some test. So go to Github and make a pull request from changed-branch to public branch.

Github pull request

4. Rerun the BTQ-CI

Now that you've changed the code rerun the whole pipeline and wait for it to end.

Run BTQ-CI a second time

After it finishes go to Sealights' dashboard and click on Boutique.

Here you should see few changes

Sealights dashboard after TIA
  • TIA was ON: This is a reminder that TIA was on when testing this build

  • Duration: The duration of the test stage was reduced from 8 min to 6 min because we skipped some tests that test unaffected code.

  • SKIPPED: Now we see that 3 tests have been skipped which results reduced testing time.

  • OVERALL COVERAGE: You'll see that the overall the coverage is reduced, because z

  • MODIFIED COVERAGE: Because we changed the code, Sealights will show you how much of your changed code has been covered by tests.

Last updated