Skip to content

Latest commit

 

History

History
81 lines (50 loc) · 2.17 KB

README.md

File metadata and controls

81 lines (50 loc) · 2.17 KB

NSelene + NUnit tests project template

Overview and general guidelines

This is a template project. It's supposed to be cloned or downloaded and edited according to your needs.

The project itself reflects an implementation of acceptance web ui tests for a "web", i.e. as "application under test" we consider here the "whole web", under "root pages" we mean "web sites", under "sub-pages" we mean "web site pages". To apply this template to your context, usually you would need to rename all "Web" entries in names or some option values in config files (like TBD) to "Your.ProjectName" with the following exceptions:

  • you can rename Www.cs to App.cs instead of YourProjectName.cs for conciseness

Hence, download it, rename the project folder to something like MyProduct.Tests, then rename the .csproj and other .cs files and namespaces correspondingly...

And you should be ready to go ;)

Installation

TBD

Details

Features supported:

Run Tests

With local Chrome

env -S "WebDriver:Local=chrome" dotnet test

overriding more than one param from appsettings.json

env -S "WebDriver:Local=chrome NSelene:Timeout=8" dotnet test

Local Selenoid on Docker

Given

Check browser images in etc/selenoid/browsers.json and once performed docker pull for all corresponding images, like:

docker pull selenoid/chrome:84.0 && docker pull selenoid/vnc_chrome:84.0

do either for "pure selenoid"

docker-compose -f etc/selenoid/compose.yaml up -d selenoid

or for "selenoid with selenoid UI"

docker-compose -f etc/selenoid/compose.yaml up -d

Then

dotnet test
overriding some settings from appsettings.json
env -S "WebDriver:Remote:enableVNC=false NSelene:Timeout=8" dotnet test

Finally

docker-compose -f etc/selenoid/compose.yaml stop

Resources