![]() |
VOOZH | about |
The Ocaramba framework utilizes a robust CI/CD architecture designed to validate the framework across multiple operating systems (Windows, Linux), browser engines, and execution environments (Docker, Selenium Grid, Cloud Providers). This is achieved through two primary orchestration systems—GitHub Actions and Azure Pipelines—which both leverage a shared layer of PowerShell orchestration scripts to maintain consistency in test execution and configuration injection.
The CI/CD strategy is split into three distinct stages: Build, Test, and Release. The "Test" stage is highly parallelized, often splitting test suites across multiple runners to reduce execution time.
CI/CD Logic Flow
Sources: .github/workflows/github-actions.yml28-117 azure-pipelines.yml36-132 scripts/ExecutingTestsOnWindowsGithubActions4.ps11-16 scripts/ExecutingTestsOnLinuxBrowserStackGithubActions.ps11-17
The GitHub Actions workflow is the primary CI system for the repository. It handles the full lifecycle from code push to NuGet publishing and documentation hosting.
<FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/.github/workflows/github-actions.yml#L1-L12" min=1 max=12 file-path=".github/workflows/github-actions.yml">Hii</FileRef>.windows-latest. It restores dependencies for OcarambaLite, Ocaramba, and the documentation project <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/.github/workflows/github-actions.yml#L64-L68" min=64 max=68 file-path=".github/workflows/github-actions.yml">Hii</FileRef>. It updates project versions using frameworkVersion <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/.github/workflows/github-actions.yml#L76-L83" min=76 max=83 file-path=".github/workflows/github-actions.yml">Hii</FileRef>, builds the core libraries, and generates SHFB documentation <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/.github/workflows/github-actions.yml#L89-L94" min=89 max=94 file-path=".github/workflows/github-actions.yml">Hii</FileRef>.Ocaramba.Tests.Appium, Ocaramba.Tests.NUnit) from Ocaramba.sln during the build stage <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/.github/workflows/github-actions.yml#L44-L63" min=44 max=63 file-path=".github/workflows/github-actions.yml">Hii</FileRef>.ocaramba/selenium image, starts services via docker-compose, and runs ExecutingTestsOnDockerGithubActions.ps1 <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/.github/workflows/github-actions.yml#L117-L157" min=117 max=157 file-path=".github/workflows/github-actions.yml">Hii</FileRef>.dotnet browserstack-sdk <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/scripts/ExecutingTestsOnWindowsGithubActions4.ps1#L6-L6" min=6 file-path="scripts/ExecutingTestsOnWindowsGithubActions4.ps1">Hii</FileRef> and Appium Android emulators..nupkg and .snupkg artifacts for both Ocaramba and OcarambaLite <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/.github/workflows/github-actions.yml#L101-L116" min=101 max=116 file-path=".github/workflows/github-actions.yml">Hii</FileRef>.For details, see GitHub Actions Workflow.
The Azure Pipelines configuration provides a mirrored CI environment, focusing on multi-framework support and Azure DevOps integration.
frameworkVersion variable (defaulting to 4.0.0) and manages Selenium Grid versions and URLs <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/azure-pipelines.yml#L26-L34" min=26 max=34 file-path="azure-pipelines.yml">Hii</FileRef>.VSBuild@1 <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/azure-pipelines.yml#L90-L96" min=90 max=96 file-path="azure-pipelines.yml">Hii</FileRef> after performing a solution pruning step similar to GitHub Actions to remove the Documentation project <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/azure-pipelines.yml#L53-L56" min=53 max=56 file-path="azure-pipelines.yml">Hii</FileRef>.PublishPipelineArtifact@1 <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/azure-pipelines.yml#L97-L127" min=97 max=127 file-path="azure-pipelines.yml">Hii</FileRef>.ASPNETCORE_ENVIRONMENT=Linux environment variable <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/azure-pipelines.yml#L170-L172" min=170 max=172 file-path="azure-pipelines.yml">Hii</FileRef>.For details, see Azure Pipelines Workflow.
To prevent duplication of logic between GitHub Actions and Azure Pipelines, the framework uses a suite of PowerShell scripts located in the /scripts directory.
Key Script Responsibilities
| Script | Purpose | Key Code Entity |
|---|---|---|
set_AppConfig_for_tests.ps1 | Injects environment-specific values into appsettings.json or XML configs. | Microsoft.Extensions.Configuration |
ExecutingTestsOnWindows*.ps1 | Orchestrates dotnet vstest or dotnet browserstack-sdk calls. | dotnet browserstack-sdk |
ExecutingTestsOnDocker*.ps1 | Manages test execution inside containers. | ExecutingTestsOnDockerGithubActions.ps1 |
ExecutingTestsOnLinux*.ps1 | Sets ASPNETCORE_ENVIRONMENT=Linux and triggers tests. | $Env:ASPNETCORE_ENVIRONMENT |
Script Interaction Diagram
For details, see PowerShell Test Orchestration Scripts.
A critical part of the pipeline is the ability to change test parameters (like browser type or hub URL) without modifying source code. The CI pipelines call set_AppConfig_for_tests.ps1 to dynamically modify the appsettings.json files in the build output directories before the test runner starts.
Example usage for Linux environments:
The script ExecutingTestsOnLinuxBrowserStackGithubActions.ps1 explicitly sets the environment to Linux <FileRef file-url="https://github.com/Accenture/Ocaramba/blob/fb3580ab/scripts/ExecutingTestsOnLinuxBrowserStackGithubActions.ps1#L4-L6" min=4 max=6 file-path="scripts/ExecutingTestsOnLinuxBrowserStackGithubActions.ps1">Hii</FileRef> before invoking the test runner to ensure the correct appsettings.Linux.json overrides are applied by the framework's BaseConfiguration.
Sources: .github/workflows/github-actions.yml44-63 azure-pipelines.yml53-56 scripts/ExecutingTestsOnWindowsGithubActions4.ps14-9 scripts/ExecutingTestsOnLinuxBrowserStackGithubActions.ps14-11