Tranquire brings the screenplay pattern to .NET. It is highly inspired by the implementation of Serenity BDD. You can refer to the Serenity documentation to understand how Tranquire works. Its goal is to better organize UI acceptance tests and make them more maintainable and readable, by applying the single responsability and open-closed principles to UI actions.
Tranquire enables UI actions by provinding an abstraction layer on top of Selenium in a form of a independant composable actions.
See the wiki
The solution is composed by Tranquire as well as test projects.
- Tranquire : the core library
- Tranquire.Selenium : contains the ui actions and questions used to automate a web UI with Selenium.
- Tranquire.NUnit : contains methods that allows to use NUnit constraint in Then actions
- ToDoList : a todomvc web project used to demonstrate tranquire.
- ToDoList.Automation : the automation framework for the todomvc app.
- ToDoList.Specifications : the acceptance tests for the todomvc app.
- Tranquire.Tests
- Tranquire.Selenium.Tests
- Tranquire.NUnit.Tests
- .NET core 2.2 SDK
- .NET Framework 4.6.2 SDK
- Google Chrome (for Selenium tests)
- npm (for the Demo app)
Using Visual Studio 2019, building and testing does not require any particular steps in Debug configuration.
dotnet build Tranquire.sln
dotnet test Tranquire.sln
The project ToDoList.Specification contains tests at the Api level and the UI level. They are intended to be run is separate test runs.
In order to run the level you want you can change the default value here. Change to either TestLevel.UI
or TestLevel.Api
, and rebuild the project.
It is then recommended to filter the tests by the appropriate category (Api or UI).
As an alternative you can configure the level and run the tests from the console:
set TEST_LEVEL=Api
dotnet test Tranquire.sln --filter Category=Api
See here for more information about the demo app