Find SeaLights-optimized tests

If you integrate Tosca with Tricentis SeaLights, you can optimize your test runs. This gives you more time to focus on the code that needs your attention.

In this topic, you'll learn how to find SeaLights-optimized tests in your repository. For example, if you want to change or remove SeaLights optimization. We also make recommendations on how to approach bulk operations.

Understand what you're looking for

To configure tests for SeaLights optimization, you use the following test configuration parameters (TCPs):

TCP name

Possible TCP values

Purpose

SeaLightsOptimization

True or False

Enabling the optimization (part of the SeaLights configuration)

SeaLightsBuildSessionIdFilePath

<Path to the file with the build session ID>

Enabling the optimization (part of the SeaLights configuration)

This means that to find SeaLights-optimized tests, you need to find all test artifacts that use the SeaLights configuration or any of the TCPs.

Run your search

To find SeaLights-optimized tests, run one of the following TQL searches on the project root:

  • To find all objects that use the configuration, enter the following search query: =>SUBPARTS:TCConfiguration[Name=="SeaLights"]->AllReferences:TCConfigurationLink=>OwningObject

  • To find all objects that use a specific TCP with a specific value, enter the following search query: =>SUBPARTS[EVALCP("<TCP name>") == "<TCP value>"]

    For example, to find all objects where the SeaLights optimization is explicitly disabled: =>SUBPARTS[EVALCP("SeaLightsOptimization") == "False"]

Change or remove configurations

After running your search, double-click an entry in the search result to jump directly to the test artifact. Then, change the TCP value or remove the configuration.

Change or remove configurations in bulk

The process for bulk updates is the same as for smaller edits: run your search, jump to a test artifact, change or remove. Understanding how configuration inheritance works can save you time and effort during bulk edits.

Child objects inherit configurations from their parent. For example, if you assign a configuration to an ExecutionList, all ExecutionEntries of this ExecutionList inherit the configuration.

This also affects your search results. For example, if you assign the configuration to an ExecutionList with 200 ExecutionEntries, the search result includes the ExecutionList and all 200 ExecutionEntries.

However, this doesn't mean that you have to adapt 201 test artifacts. Instead, we recommend the following approach:

  1. Run your TQL search.

  2. Adapt test artifacts by hierarchy. Start with the higher-level search results, such as folders or ExecutionLists. The changes you make for these test artifacts automatically apply to all their children. For example, if you remove the configuration from an ExecutionList, Tosca also removes it from all ExecutionEntries of this ExecutionList.

  3. Run the TQL search again to see what's left. Again, remove or change the configuration for higher-level search results first. For example, ExecutionEntry folders.

  4. Repeat this process until you've removed or changed all occurrences of the configuration.

What's next

You just changed or removed a configuration. Maybe it's time for another test run, to make sure your changes work as expected.