Gauge example in csharp
This is an example project for doing web automation testing with Gauge. This project tests some of the functionalities of the active admin demo app. This app is hosted as a Java WAR (with embedded Jetty).
Running this example
The tests are run on Chrome by default.
Prerequisites
This example requires the following softwares to run.
- Java 1.7 or above
- Note that this is required to run the active admin demo application
- .NET v4.5 (required for the CSharp plugin to run), you could write your test code to target a lesser version.
- Gauge Visual Studio plugin (2015)
- NuGet package manager
- Gauge
- Gauge csharp plugin
- can be installed using
gauge --install java
- can be installed using
- Chrome
Setting up the System Under Test (SUT)
- Download activeadmin-demo.war
- Bring up the SUT by executing the below command
java -jar activeadmin-demo.war
- The SUT should now be available at http://localhost:8080
Get the Dependencies
NuGet.exe install
Run specs
This runs Gauge specs with with IE as default browser for specs execution. Make sure IE is installed in your machine and IEDriverSelenium is in PATH.
If you want to use Firefox/Chrome as browser, pass the corresponding argument to set browser environment as follows:
gauge specs --env="firefox"
or
gauge specs --env="chrome"
Topics covered in the example
- Specification, Scenario, Step, Concepts and Context Steps
- Table parameters
- Using External datasource (special param)
- Using tags
- Using Gauge with Selenium Webdriver
- Running Gauge specs with Maven
Copyright
Copyright 2016, ThoughtWorks Inc.