Skip to content

Latest commit

 

History

History
165 lines (118 loc) · 11.8 KB

c#-test-automation.md

File metadata and controls

165 lines (118 loc) · 11.8 KB

C# test automation

A comprehensive curated list of C# test automation frameworks, tools, libraries and software to help software engineers easily bootstrap test automation on C#. Sponsored by http://sdclabs.com

Have questions\issues\problems, join the chat at https://gitter.im/atinfo/awesome-test-automation

Table of content:

Also:


xUnit frameworks

  • NUnit ― The most known, extensible and portable(yes, you can run your tests on Mono for Linux and Mac) unit-testing framework in the .Net world. It comes with descent test adapters for Visual Studio 2013 - ... as well as standalone GUI and command line runners
  • MSTest** (Visual Studio Test) ― the most conservative and slow evolving unit testing framework with only one good thing: it is built-in to the Visual Studio. So, you can always rely it is there.
  • xUnit ― the "bleeding edge" unit testing framework, beloved by many developers, even from Microsoft. This is community based open source project, written by the original inventor of NUnit 2.0
  • Gallio Icarus and MbUnit ― the most feature reach Test Runner, Test Reporter and Unit testing framework. It is still popular in many .NET shops, especially for running Selenium WebDriver UI tests... Unfortunately, it is not being maintained since 2012. 💀

TDD \ ATDD \ BDD

  • Fluent Assertions is a set of .NET extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style test.
string actual = "ABCDEFGHI";
actual.Should().StartWith("AB").And.EndWith("HI").And.Contain("EF").And.HaveLength(9);
  • Specflow ― the most popular and feature reach "Cucumber for .NET": BDD and Keywork-driven testing Editor, Runner and Reporter.
  • BDDfy is the simplest BDD framework for .Net EVER! The name comes from the fact that it allows you to turn your tests into BDD behaviors simply.

Code analysis

  • NCover ― really good code coverage tool, but $$
  • OpenCover is a code coverage tool for .NET 2 and above, support for 32 and 64 processes with both branch and sequence points
  • See also: Code Coverage for C#/.NET

Web UI test automation

  • Selenium WebDriver ― Yes! WebDriver is everywhere! This is the best and the most popular UI test automation library and infrastructure.
  • Atata ― An open source C#/.NET test automation full featured framework based on Selenium WebDriver. It uses fluent page object pattern with built-in logging. Atata Framework is extensible and contains a set of components, triggers and much more.
  • Coded UI ($$$) (Internet Explorer only) ― Okay... it is integrated into the Visual Studio Premium+ and supports Record&Playback "automation".
  • WatiN ― Before the Selenium Webdriver appeared on the market, WatiN was one of the best Web UI automation frameworks for .NET. Now it is not maintained. 💀
  • Golem 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. Company behind it (ProtoTest) is in the process of winding down. Last commit was done in May, 2015.

Mobile test automation

  • Coded UI supports some level of the mobile test automation for Windows Phone
  • Xamarin.UITest is a library that comes with Xamarin Forms and allows you to automate the applications built with Xamarin technology on Windows Phone, iOS and Android
  • Appium supports cross platform test automation for Native and Hybrid mobile applications
  • Testura.Android A lightweight test automation framework to test android applications. Easy to start and require minimum set up.

Windows UI test automation

  • Winium.Cruciatus is an open source C# Framework for automated testing of Windows application based on WinForms and WPF platforms.
  • Teststack White is one of the most popular and stable open source UI test automation library for Windows (WinAPI / WPF / Silverlight / Windows Forms).
  • Coded UI ($$$) does a pretty good job for Windows UI automation. Pricey... because it comes with Visual Studio Premium and Ultimate.
  • AutoIt (COM bindings) ― since it implements COM+ interface, autoit can be available from any language on windows, including C#.
  • WebAii Testing Framework - Framework for cross-browser testing with native support for Telerik UI for ASP.NET AJAX, Silverlight, WPF, HTML5 and XAML applications, etc.
  • FlaUI UI automation library for .Net. Rewritten White with UIA3, UIA2, MSAA support
  • Windows Application Driver - Windows Application Driver is a service to support UI Test Automation of Windows Applications. The service design subscribes to the Mobile JSON Wire Protocol standard.

Virtual environments

Contribute to this section

Performance & stress & load

Contribute to this section

Security checking

Contribute to this section

Continuous Integration

  • Jenkins ― can be easily configured to support C# continuous integration process:

    1. Use NUnit as your test runner with Jenkins NUnit Plugin
    2. Use Microsoft Build Tools to build the project without Visual Studio
    3. Use Windows Batch files and / or Powershell to perform any system configuration tasks
    4. Use msdeploy from Web Deploy Toolkit in order to perform the remote deployment and configuration tasks.
  • Teamcity is a free and simple Build and Continuous integration server. You can run the C# tests just out of the box

  • [Team Foundation Server] ― well... the marketing guys say that it can also build something for you

  • Appveyor is free for open source projects and easy to use.

Reporting

  • ExtentReports - An open-source reporting library for test automation.
  • GHPReporter - An open-source .NET test reporting tool for several testing frameworks (supports NUnit 3, MSTest and SpecFlow).
  • Allure - An open-source reporting library for test automation (NUnit 2 and MSTest adapters).

Documentation generation

Doxygen is a free and open source documentation generation platform, that supports multiple languages. You may write a standard C# XML documentation ― and Doxygen will process it correctly; Yo may use markdown and include images ― Doxygen can handle even more. Grab and modify this Doxyfile for C#

Editors, IDE, consoles

Useful libs

  • Json.NET is a popular high-performance JSON framework for .NET
  • RestSharp ― simple REST and HTTP API Client
  • XMLUnit - testing and comparing XML output for Java and .NET

Resources

Where to discover new libraries, information, tools, etc.

Websites

Other Awesome Test Automation Lists

Also we are supporting and looking for contribution for project:

Your contributions are always welcome!