Stacks Testing Frameworks

Building testing frameworks from scratch requires a lot of boilerplate code. It is also hard to know how to get started without examples.

As part of the Amido Stacks projects we have developed a range of testing frameworks for each part of our solutions that are already built in, which can be bootstrapped and tailored to your current project with just one command. In addition they also exist as standalone solutions that can be run cloned and run without the need to build the entire solution can can be modified to applications and workloads outside of stacks.

Bootstrap your framework

The best way to get started, is bootstrapping the framework using the scaffolding-cli from Amido Stacks. By using it in interactive mode, you can simply answer 5 questions to get a bespoke framework, ready to go with an example test.

npx @amidostacks/scaffolding-cli test -i

Interactive questions

โœ” Select test framework
โœ” Please provide the company name to test for
โœ” Please provide the project name to be tested
โœ” Please provide test scope (domain)
โœ” Select Pipeline Tool

Framework types

cypress*Typescript - TestCafeC# - SeleniumJava - Serenityjest-sonar*
Framework TypeAcceptance Functional E2E Functional API Component Accessibility Visual RegressionAcceptance Functional E2E AccessibilityAcceptance Functional E2EAcceptance Functional E2EUnit Component Integration
LanguageTypescript Optional: JavascriptTypescript Optional: JavascriptC#JavaTypescript Optional: Javascript
FrameworkCypressTestCafeBespokeSerenityJest
Libraries and ToolsMocha Chai Chai-jQuery Sinon.JS Sinon-Chai Lodash Minimatch Moment Blob PromiseAxios TestCafe Assertions TestCafe APIMicrosoft Test SDK Selenium WebDriver ChromeDriver Shouldly BDDfy xUnitJava SDK Selenium WebDriver ChromeDriver Serenity JUnitJest Snapshot @testing-library/react
IntegrationsAxe ApplitoolsAxe LambdaTestSonar Scanner
Report(s)jUnit/xUnit xunit-viewer (single page HTML) Mochawesome (rich HTML results with screenshots)xUnitBDDfy xUnitSerenity reportsjUnit/xUnit Cobertura, lcov (code coverage) Sonar reporter
BrowsersUsed: Google Chrome Supported: Mozilla Firefox Microsoft Edge Electron BraveUsed: LambdaTest Google Chrome Supports: Internet Explorer (11+) Microsoft Edge (legacy and Chromium-based) Mozilla Firefox SafariUsed: Google Chrome Supports: LambdaTest Internet Explorer (11+) Microsoft Edge (legacy and Chromium-based) Mozilla Firefox SafariUsed: Google Chrome Supports: Internet Explorer (11+) Microsoft Edge (legacy and Chromium-based) Mozilla FirefoxN/A
PipelineAzureDevopsAzureDevopsAzureDevops
Example Test(s)YesYesYesYesYes
Example Data TeardownN/A (stubbed request)YesYesYesN/A
BDDMochaBDDfySerenityJasmine
FeaturesAutomatic waiting In browser Element selector tool Spies, stubs , clocks Real time reloads Can use the same environment variables as the webappCross browser Script injectionWebDriverWebDriver Multi-thread test execution Enhanced reportingRender
Screenshots +/- VideosYesYesYesYesNo

* Currently cannot be bootstrapped from @amidostacks/scaffolding-cli, but is available to clone from the amido/stacks-webapp-template repository.

Get testing in just five questions

asciicast

Get testing

At the end of bootstrapping your example framework, you will have an output that will contain all the:

  • Dependencies
  • Scripts
  • Example tests
  • Pipelines
  • Environment variables
  • ...and information to start testing immediately
Example output from Selenium framework with .NET output folder structure
โ”œโ”€โ”€ Api
โ”‚ย ย  โ””โ”€โ”€ Builders
โ”‚ย ย  โ””โ”€โ”€ Http
โ”‚ย ย  โ”œโ”€โ”€ HttpRequestBuilder.cs
โ”‚ย ย  โ””โ”€โ”€ HttpRequestFactory.cs
โ”œโ”€โ”€ Company.Project.E2E.Selenium.csproj
โ”œโ”€โ”€ Company.Project.E2E.Selenium.sln
โ”œโ”€โ”€ Configuration
โ”‚ย ย  โ”œโ”€โ”€ ConfigAccessor.cs
โ”‚ย ย  โ””โ”€โ”€ ConfigModel.cs
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ Selenium
โ”‚ย ย  โ”œโ”€โ”€ Components
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ CreateForm.cs
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ Header.cs
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ MenuList.cs
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ Notifier.cs
โ”‚ย ย  โ”œโ”€โ”€ Factory
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ RemoteWebDriverFactory.cs
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ WebDriverFactory.cs
โ”‚ย ย  โ”œโ”€โ”€ Pages
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ PageObject.cs
โ”‚ย ย  โ””โ”€โ”€ SeleniumWrapper.cs
โ”œโ”€โ”€ Tests
โ”‚ย ย  โ”œโ”€โ”€ Fixtures
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ BaseSetup.cs
โ”‚ย ย  โ”œโ”€โ”€ Steps
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ CreateMenu.cs
โ”‚ย ย  โ””โ”€โ”€ Stories
โ”‚ย ย  โ””โ”€โ”€ GetMenuExampleTests.cs
โ””โ”€โ”€ appsettings.json

You are ready to follow the frameworks README.md and run your first test!

Customising

Since the frameworks provide real examples on deployed applications, we recommend using these as examples and then replacing them with your own applications under test.

Feedback

As always, we only improve from the incredible feedback and contributions from people like you. To help us improve, see our contribution guide for more information.