Shift Left Testing

Test optimization fosters faster delivery cycles by enabling "shift-left testing". This approach involves introducing testing activities earlier in the development process, specifically targeting changes made in the code. By using test optimization:

  • You focus on relevant tests: Only tests linked directly to your code changes are executed, reducing overall testing time.

  • Issues are caught earlier: By testing changes as they happen, problems are identified sooner in the development lifecycle, before they can propagate and become more complex to fix.

  • Time to market is accelerated: Faster test cycles and earlier bug detection lead to quicker overall development, allowing you to get your code to market faster.


Step-by-Step Tutorial

1. Integrate the Tool
  • Choose and integrate a test optimization tool into your development pipeline.

  • Activate Test Optimization for pull request. The settings is currently done manually by SeaLights.

2. Configure Advanced Test Stages as Part of Pull Request Testing
  • Make sure the desired test stages you woud like to execute ealy in the process are now part of the development pipeline, are triggered automatically upon code commit.

  • Create a build that executes all your tests as a starting point for the Test Impact Analysis (TIA) engine to map tests to relevant code sections.

3. Trigger Focused Testing on Pull Request
  • Push your code changes to the version control system. Upon code commit, the CI/CD pipeline automatically triggers the test optimization tool.

  • The tool analyzes your codebase and identifies the modified sections.

  • Based on the code changes, the tool automatically selects and executes only the relevant tests (partial suite), significantly reducing execution time compared to running the entire test suite.

4. Review Targeted Results

Once the tests complete, access the results through your test management tools. You'll see only the tests selected by the TIA, ensuring you focus on the most relevant information related to your specific code changes.

5. Analyze and Address Issues

Analyze the test results to identify any failures associated with your code changes.

6. Fix and Re-test

Address identified issues in your code and re-run the focused test suite, verifying the fix and ensuring the change didn't introduce new issues.

Test optimization empowers developers to be more proactive and efficient throughout the development process, ultimately contributing to faster and higher-quality releases.

Last updated