3-Component Integration Build

The steps described below define how to report an integration build from 3 components: two backends (Java & .NET) and a front end (JavaScript).

The architecture diagram of the use case described in this tutorial:

Step 0 - Define a common LabID

The Sealights' LabID is a string that identifies the testing environment. Normally, this string is generated in the dashboard under the Settings > Integration Build Labs:

In the current example (our tutorial), the LabID used will be QA-ENV1.

Note: The ability to add the Integration Build Lab identifier will be available only after completing Step 2 in this walkthrough

Step 1 - Build, Report & Deploy Components

Component-1 - Back end, Java (Tomcat)

  • Build and Report Component #1 to the Sealights dashboard

  • Deploy Component #1: In the JVM arguments, specify a Lab ID parameter (QA-ENV1).

Component-2 - Back end, .NET (IIS)

  • Build and Report Component #2 to the Sealights dashboard:

  • Deploy Component #2: when starting the collector service session, specify the same Lab ID parameter as before:

Component-3 - Front end, JavaScript

  • Build and Report Component #3 to the dashboard:

  • Deploy the instrumented version of your code onto the webserver.

Unlike previous steps, with Front End JavaScript the Lab ID is generally defined within the build scan command. Please refer to Deploying Instrumentation for several environments (Lab IDs) for further details.

Step 2 - Create Integration Build & Report Its Components

Create an integration build using one of the following methods:

  1. SeaLights agent command: Component File

  2. REST API calls using Sealights APIs: Integration Builds

In our case, we will provide the following JSON file content to the agent scan command (as a file named sl-integration-components.json)

From the different options available, we’ll go with the Java agent to report this integration build

Step 3 - Execute Tests Against Integration Build

Application Server Configuration Review

The build session ID used should correspond to the component (unique per component), whereas the lab ID should correspond to the environment (shared between components). For example:

BuildSessionId
LabId

Back end environment which contains Component #1

BSID-Component #1

QA-ENV1

Back end environment which contains Component #2

BSID-Component #2

QA-ENV1

Front end environment which contains Component #3

BSID-Component #3

QA-ENV1

Test Runner Configuration Review

  • The build session ID used for reporting test executions should correspond to the integration build, under which the information will be displayed.

  • The lab ID should reflect the same environment identifier as the other components which make up the integration build to ensure all the coverage data will be linked together (In our example: QA-ENV1).

  • If running tests using the Maven plugin, make the following modifications to the .JSON configuration file before executing your tests with the SeaLights plugin enabled:

  • If running tests using the Gradle plugin, make the following modifications to your build.gradle according to the following example:

  • If running tests using Java CLI commands, use the following configuration in your start/end execution commands:


Last updated

Was this helpful?