Skip to content

Latest commit

 

History

History
69 lines (52 loc) · 2.69 KB

README.md

File metadata and controls

69 lines (52 loc) · 2.69 KB

tranquire

NuGet

Introduction

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.

Documentation

See the wiki

Solution overview

The solution is composed by Tranquire as well as test projects.

Tranquire

  • 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

Demo project

  • 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.

Tests projects

  • Tranquire.Tests
  • Tranquire.Selenium.Tests
  • Tranquire.NUnit.Tests

Building the sources

Requirements

  • .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.

Building

dotnet build Tranquire.sln

Running tests

dotnet test Tranquire.sln

Running end to end tests of the demo application

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