Available in Nuget: https://www.nuget.org/packages/golem
As MbUnit and Gallio have become deprecated, Golem has needed to migrate to another unit testing framework. Golem V2 is now live, and currently supports nUnit v3 fixtures. MsTest support will be added next.
This means that all tests must be marked with the NUnit.Framework [Test] fixture, and no longer can use the MbUnit Fixtures.
For the most part, the NUnit Fixtures act virtually identical to the MbUnit ones, and simply replacing the MbUnit.Framework namespace with the NUnit.Framework namespace will fix most issues.
To Execute: You may execute tests from the command line using the nunit-console.exe. To execute tests within Visual Studio either the nunit3 plugin or resharper Visual Studio plugin must be installed.
A HTML report will be generated in the reports folder after each execution.
Parallel execution is supported at a class/fixture level, not a Test/Function level.
Multiple browsers are not currently supported. Only a single browser may be defined per config file.
Additionally, as ProtoTest is no longer in existance that name will be removed moving forward.
##Object Oriented C# Automated Testing Framework
Golem was created to simplify the process of creating enterprise-scale automated testing suites. It wraps around Gallio/MbUnit and a number of automation tools (such as Selenium-WebDriver) to provide the tester with a simple process for creating automated tests no matter what the tool. The inclusion of advanced features, diagnostic information, easy configuration, and enhanced API's helps Golem make automating in code-based automation tools much more practical. A standard test structure is enforced throughout the Golem framework to make the code readable and easy to reuse.
The Golem repository contains several modules that can be used to test desktop or mobile browsers (Golem.WebDriver), Android and iOS applications (Golem.Appium), Windows applications (Golem.Purple), or HTTP requests and web services (Golem.Rest).
As Golem is built on top of MbUnit, all advanced MbUnit attributes are supported including data driven testing, parallel test execution, and test filtering via meta-data.
Golem is available via NuGet : https://www.nuget.org/packages/ProtoTest.Golem/
Getting Started : https://github.com/ProtoTest/ProtoTest.Golem/wiki/Golem.WebDriver,-Getting-Started
For all documentation, visit the Golem Wiki.
##Example Tests are written as MbUnit Tests using a human readable DSL via Page Objects, and can be executed via Gallio or TestDriven.net.
class TestExample : WebDriverTestBase
{
[Test]
[Category("Google Example")]
[TestsOn("Search Results")]
[Author("Brian Kitchener")]
[Description("Performs a search on google and validates a result is displayed")]
public void TestGoogleSearch()
{
OpenPage<GoogleHomePage>("http://www.google.com/").SearchFor("Selenium").VerifyResult("Selenium - Web Browser Automation");
}
Page Objects are simple, and stable. WaitForElements() allows for automatic waiting and page validations.
public class GoogleHomePage : BasePageObject
{
Element searchField = new Element("SearchField", By.Name("q"));
Element googleLogo = new Element("GoogleLogo", By.Id("hplogo"));
Element searchButton = new Element("SearchButton", By.Name("btnK"));
Element feelingLuckyButton = new Element("ImFeelingLuckyButton", By.Name("btnI"));
public GoogleResultsPage SearchFor(string text)
{
searchField.Text = text;
searchField.Submit();
return new GoogleResultsPage();
}
public override void WaitForElements()
{
searchField.WaitUntil().Present();
googleLogo.WaitUntil().Present();
searchButton.WaitUntil().Present();
feelingLuckyButton.WaitUntil().Present();
}
}
The Element class extends IWebElement and handles finding the element and includes a chainable DSL.
searchField.WaitUntil(30).Visible().Verify().Value("ProtoTest").Click();
Test reports include robust diagnostic information. A command log, source html, screenshots/video, and HTTP traffic configurable through code or an App.config.
##How to Get Started
-
Install the ProtoTest.Golem Nuget package into a C# project. This sets up Selenium and WebDriver along with the Golem framework.
-
Take a look at the Golem.Core documention for an overview of the framework.
-
Golem includes modules for testing web sites, REST api's and desktop applications. Take a look at the respective documentation to get started with each.
- For web sites, use Golem.WebDriver.
- For RESTful services, use Golem.Rest.
- For desktop applications, use Golem.Purple.
##Contributing to Golem If you would like to contribute to golem:
- Post a thread detailed proposed changes in prototest-golem user group
- Clone Golem
- Perform modifications on a new branch
- Commit branch changes
- Issue pull-request against that branch