Skip to content

Latest commit

 

History

History
173 lines (126 loc) · 13 KB

c#-test-automation.md

File metadata and controls

173 lines (126 loc) · 13 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 ― A pragmatic BDD solution for .NET. It uses the Gherkin specification language and integrates to Visual Studio.
  • SpecFlow.Selenium.Plugin ― SpecFlow plugin for Selenium instances generation over tags. Cucumber for dotnet
  • BDDfy - 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
  • NCrunch - an automated concurrent testing tool for Visual Studio.
  • 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.
  • Mailosaur - .NET client for email testing/automation via Mailosaur.

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.
  • Cutie - CUITe (Coded UI Test enhanced) Framework is a thin layer developed on top of Microsoft Visual Studio Team Test's Coded UI
  • 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

  • Allure - An open-source reporting library for test automation (NUnit 2 and MSTest adapters).
  • Allure SpecFlow - Allure SpecFlow Plugin
  • Allure NUnit - Allure NUnit plugin
  • ReportPortal - Full-featured result management tool for clients, managers & test automation engineers (NUnit 2, Nunit 3 and SpecFlow adapters).
  • 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).

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#
  • Wyam Static site generator with built-in capability to generate API documentation from .NET library metadata and XML documentation.

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!