https://github.com/andreasneuber/csharp-cucumber-selenium-example
A sample implementation of BDD UI tests with C#, NUnit and Reqnroll.
https://github.com/andreasneuber/csharp-cucumber-selenium-example
bdd csharp nunit reqnroll selenium testautomation
Last synced: 4 months ago
JSON representation
A sample implementation of BDD UI tests with C#, NUnit and Reqnroll.
- Host: GitHub
- URL: https://github.com/andreasneuber/csharp-cucumber-selenium-example
- Owner: andreasneuber
- License: mit
- Created: 2022-10-01T05:56:05.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-10-18T16:01:25.000Z (5 months ago)
- Last Synced: 2025-10-19T09:38:05.104Z (5 months ago)
- Topics: bdd, csharp, nunit, reqnroll, selenium, testautomation
- Language: C#
- Homepage:
- Size: 141 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# csharp-cucumber-selenium-example
A sample implementation of BDD UI tests with C# / NUnit / Reqnroll
## Application under test
The feature files, step definitions and page objects were written for https://github.com/andreasneuber/automatic-test-sample-site.
Readme in that repo has further details how to set it up.
### IDE used
Microsoft Visual Studio Community 2022 (with .NET desktop development workload)
### Setup
- git clone
- Double-click file `csharp-cucumber-selenium-framework.sln`
- Solution opens in Visual Studio
- Right-click on solution, build solution
- Go to "View" and open the "Test Explorer" window
- Click green "Run All Tests In View" button
### Updating
Especially ChromeDriver needs frequent updating.
- Go to "Tools > NuGet Package Manager > Manage NuGet Packages for Solution..."
- Go to tab "Updates"
- Update
- Right-click on solution, build solution
- Close and reopen solution
### Set Browser
Open file `app.config` and find key "Browser". You can choose between:
- chrome
- chrome_headless
- firefox
- edge
- safari
After changing the browser, rebuild the solution.
### Helpful VS keyboard shortcuts
- Duplicate line: `CTRL + E + V`
- Go to definition: `F12`
- Quick code formatting: `Ctrl + K , Ctrl + D`
### FAQ
#### Where can I change the Base Url?
See app.config > appSettings
#### How can I switch browser to "headless"?
See app.config > appSettings
#### Error "csharp-cucumber-selenium-framework\bin\Debug\chromedriver.exe". Access to the path 'csharp-cucumber-selenium-framework\bin\Debug\chromedriver.exe' is denied.
- Run `taskkill /f /im chromedriver.exe`
- Clean solution
### Links
- [Reqnroll Documentation](https://docs.reqnroll.net/latest/index.html)