Skip to content

LambdaTest/specflow-selenium-hypertest-sample

 
 

Repository files navigation

Run SpecFlow Selenium Tests on HyperExecute with TestMu AI (Formerly LambdaTest)

Made by TestMu AI SpecFlow version Community

Getting Started

TestMu AI (Formerly LambdaTest) is the world's first full-stack AI Agentic Quality Engineering platform that empowers teams to test intelligently, smarter, and ship faster. Built for scale, it offers a full-stack testing cloud with 10K+ real devices and 3,000+ browsers. With AI-native test management, MCP servers, and agent-based automation, TestMu AI supports Selenium, Appium, Playwright, and all major frameworks.

With TestMu AI (Formerly LambdaTest), you can run SpecFlow Selenium tests at scale on the HyperExecute smart test orchestration platform. This sample shows how to configure and execute C# SpecFlow tests using both Matrix and Auto-Split strategies on the TestMu AI cloud.

Prerequisites

  • .NET SDK (LTS release)
  • A TestMu AI (Formerly LambdaTest) account with HyperExecute access

Download the HyperExecute CLI binary corresponding to the host operating system. It is recommended to download the binary in the project's Parent Directory.

Setup

Clone the repository:

git clone https://github.com/LambdaTest/specflow-selenium-hypertest-sample.git
cd specflow-selenium-hypertest-sample

The project structure is as shown below:

specflow-demo-sample
      |
      |--- Features (Contains the feature files)
              |
              | --- GoogleSearch.feature
              | --- LambdaTestSearch.feature
              | --- SeleniumPlayground.feature
              | --- ToDoApp.feature
      |--- Hooks (Contains the event bindings to perform additional automation logic)
              | --- Hooks.cs
      |--- Steps (Contains the step definitions that correspond to the feature files)
              | --- GoogleSearchSteps.cs
              | --- DuckDuckGoSearchSteps.cs
              | --- SeleniumPlaygroundSteps.cs
              | --- ToDoAppSteps.cs
      |--- dotnet-install.sh  (Windows - Shell script to install .NET SDK, including .NET CLI & shared runtime)
      |--- dotnet-install.ps1 (macOS - Shell script to install .NET SDK, including .NET CLI & shared runtime)
      |--- App.config (Application Configuration file containing settings specific to the app)
      |
      yaml
       |
       |--- specflow_hypertest_matrix_sample.yaml
       |--- specflow_hypertest_autosplit_sample.yaml

Set your credentials as environment variables.

macOS / Linux:

export LT_USERNAME="YOUR_USERNAME"
export LT_ACCESS_KEY="YOUR_ACCESS_KEY"

Windows:

set LT_USERNAME="YOUR_USERNAME"
set LT_ACCESS_KEY="YOUR_ACCESS_KEY"

Running Tests in SpecFlow Using the Matrix Strategy

Matrix YAML file (specflow_hypertest_matrix_sample.yaml) in the repo contains the following configuration:

globalTimeout: 90
testSuiteTimeout: 90
testSuiteStep: 90

Global timeout, testSuite timeout, and testSuiteStep timeout are set to 90 minutes.

The target platform is set to macOS:

os: [mac]

A user-defined key project is set to the C# solution (i.e. .sln). It can even be set to a C# project (.csproj) instead of C# solution. Hence, the matrix comprises of os and project keys:

matrix:
  os: [mac]
  project: ["OnlySpecTest.sln"]

Content under the pre directive is the pre-condition that will run before the tests are executed on the HyperExecute grid. The "dotnet install" scripts for macOS & Windows are downloaded from Microsoft Official Website.

Environment variables LT_USERNAME and LT_ACCESS_KEY are added under env in the YAML file:

env:
 LT_USERNAME: LT_USER_NAME
 LT_ACCESS_KEY: LT_ACCESS_KEY

The pre-condition installs the LTS .NET release and sets permissions on the C# project:

pre:
   - ./dotnet-install.sh --channel LTS
   - chmod +rwx OnlySpecTest.sln

The testSuites object contains commands for executing the tests. In the current YAML file, dotnet test command is used for executing the tests:

testSuites:
  - dotnet test $project

Run the following command on the terminal to trigger the tests in the C# project on the HyperExecute grid:

./hyperexecute --user "${ YOUR_LAMBDATEST_USERNAME()}" --key "${ YOUR_LAMBDATEST_ACCESS_KEY()}" --config specflow_hypertest_matrix_sample.yaml --verbose

Visit the HyperExecute Automation Dashboard to check the status of execution.

Running Tests in SpecFlow Using Auto-Split Execution

Auto-split YAML file (specflow_hypertest_autosplit_sample.yaml) in the repo contains the following configuration:

globalTimeout: 90
testSuiteTimeout: 90
testSuiteStep: 90

The runson key determines the platform (or operating system) on which the tests would be executed. Here we have set the target OS as macOS:

runson: mac

Auto-split is set to true in the YAML file:

autosplit: true

Retry on failure is set to False and the concurrency is set to 1:

retryOnFailure: false
maxRetries: 5
concurrency: 1

Content under the pre directive is the pre-condition that will run before the tests are executed on the HyperExecute grid:

env:
 LT_USERNAME: ${ YOUR_LAMBDATEST_USERNAME()}
 ACCESS_KEY: ${ YOUR_LAMBDATEST_ACCESS_KEY()}
pre:
   - ./dotnet-install.sh --channel LTS
   - chmod +rwx OnlySpecTest.sln

The testDiscoverer contains the command that locates the C# solution (i.e. .sln):

find . -type f -name "*.sln"

Running the above command on the terminal gives the following output:

./OnlySpecTest.sln

Run the following command on the terminal to trigger the tests:

./hyperexecute --user "${ YOUR_LAMBDATEST_USERNAME()}" --key "${ YOUR_LAMBDATEST_ACCESS_KEY()}" --config specflow_hypertest_autosplit_sample.yaml --verbose

Visit the HyperExecute Automation Dashboard to check the status of execution.

Run tests

Matrix mode:

./hyperexecute --user "${ YOUR_LAMBDATEST_USERNAME()}" --key "${ YOUR_LAMBDATEST_ACCESS_KEY()}" --config specflow_hypertest_matrix_sample.yaml --verbose

Auto-split mode:

./hyperexecute --user "${ YOUR_LAMBDATEST_USERNAME()}" --key "${ YOUR_LAMBDATEST_ACCESS_KEY()}" --config specflow_hypertest_autosplit_sample.yaml --verbose

View results on your TestMu AI dashboard.

Contributions

Contributions are welcome. Open an issue to discuss your idea before submitting a pull request. When reporting bugs, include your .NET version, OS, and SpecFlow version.

TestMu AI (Formerly LambdaTest) Community

Connect with testers and developers in the TestMu AI Community. Ask questions, share what you are building, and discuss best practices in test automation and DevOps.

TestMu AI (Formerly LambdaTest) Certifications

Earn free TestMu AI Certifications for testers, developers, and QA engineers. Validate your skills in Selenium, Cypress, Playwright, Appium, Espresso and more. Industry-recognized, shareable on LinkedIn, and built by practitioners, not marketers.

Learning Resources by TestMu AI (Formerly LambdaTest)

Learn modern testing through tutorials, guides, videos, and weekly updates:

LambdaTest is Now TestMu AI

On January 12, 2026, LambdaTest evolved to TestMu AI, the world's first fully autonomous Agentic AI Quality Engineering Platform.

Same team. Same infrastructure. Same customer accounts. All existing LambdaTest logins, scripts, capabilities, and integrations continue to work without change.

Find the new home for LambdaTest.

How LambdaTest Evolved into TestMu AI

In 2017, we launched LambdaTest with a simple mission: make testing fast, reliable, and accessible. As LambdaTest grew, we expanded into Test Intelligence, Visual Regression Testing, Accessibility Testing, API Testing, and Performance Testing, covering the full depth of the testing lifecycle.

As software development entered the AI era, testing had to evolve, too. We rebuilt the architecture to be AI-native from the ground up, with autonomous agents that plan, author, execute, analyze, and optimize tests while keeping humans in the loop. The platform integrates with your repos, CI, IDEs, and terminals, continuously learning from every code change and development signal.

That evolution earned a new name: TestMu AI, built for an AI-first future of quality engineering. TestMu is not a new name for us. It is the name of our annual community conference, which has brought together 100,000+ quality engineers to discuss how AI would reshape testing, long before that became an industry norm.

What started as a high-performance cloud testing platform has transformed into an AI-native, multi-agent system powering a connected, end-to-end quality layer. That evolution defined a new identity: LambdaTest evolved into TestMu AI, built for an AI-first future of quality engineering.

Support

Got a question? Email support@testmuai.com or chat with us 24x7 from our chat portal.

About

Run SpecFlow Selenium Tests with HyperExecute on TestMu AI (Formerly LambdaTest).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C# 79.5%
  • Gherkin 20.5%