Code Monkey home page Code Monkey logo

atata's Introduction

NuGet GitHub release Gitter Twitter

C#/.NET web UI test automation full featured framework based on Selenium WebDriver. It uses fluent page object pattern.

What's new in v0.14.0

Features

  • WebDriver. Based on Selenium WebDriver and preserves all its features.
  • Page Object. Provides unique fluent page object pattern that is easy to implement and maintain.
  • Components. Supports a rich set of HTML components.
  • Integration. Works on any .NET test engine (e.g. NUnit, xUnit) as well as on CI systems like TeamCity or TFS.
  • Triggers. A bunch of triggers to bind with different component events.
  • Verification. A set of methods and triggers for the component and data verification.
  • Configurable. Defines the default component search strategies as well as additional settings.
  • Logging. Built-in customizable logging and screenshot capturing functionality.
  • Extensible. Atata.Bootstrap and Atata.KendoUI packages have a set of ready to use components.

Usage

Page Object

Simple sign-in page object for http://atata-framework.github.io/atata-sample-app/#!/signin page:

using Atata;

namespace SampleApp.UITests
{
    using _ = SignInPage;

    [Url("signin")] // Relative URL of the page.
    [VerifyH1] // Verifies that H1 header text equals "Sign In" upon page object initialization.
    public class SignInPage : Page<_>
    {
        [FindByLabel] // Finds <label> element containing "Email" (<label for="email">Email</label>), then finds text <input> element by "id" that equals label's "for" attribute value.
        public TextInput<_> Email { get; private set; }

        [FindById("password")] // Finds password <input> element by id that equals "password" (<input id="password" type="password">).
        public PasswordInput<_> Password { get; private set; }

        [FindByValue(TermCase.Title)] // Finds button element by value that equals "Sign In" (<input value="Sign In" type="submit">).
        public Button<_> SignIn { get; private set; }
    }
}

Test

Usage in the test method:

[Test]
public void SignIn()
{
    Go.To<SignInPage>().
        Email.Set("[email protected]").
        Password.Set("abc123").
        SignIn.Click();
}

Find out more on Atata usage. Check atata-framework/atata-samples for different Atata test scenario samples.

Demo

Demo atata-framework/atata-sample-app-tests UI tests application demonstrates different testing approaches and features of Atata Framework. It covers main Atata features: page navigation, data input and verification, interaction with pop-ups and tables, logging, screenshot capture, etc.

Sample test:

[Test]
public void User_Create()
{
    string firstName, lastName, email;
    Office office = Office.NewYork;
    Gender gender = Gender.Male;

    Login().
        New().
            ModalTitle.Should.Equal("New User").
            General.FirstName.SetRandom(out firstName).
            General.LastName.SetRandom(out lastName).
            General.Email.SetRandom(out email).
            General.Office.Set(office).
            General.Gender.Set(gender).
            Save().
        Users.Rows[x => x.FirstName == firstName && x.LastName == lastName && x.Email == email && x.Office == office].View().
            Header.Should.Equal($"{firstName} {lastName}").
            Email.Should.Equal(email).
            Office.Should.Equal(office).
            Gender.Should.Equal(gender).
            Birthday.Should.Not.Exist().
            Notes.Should.Not.Exist();
}

Documentation

Find out more on Atata Docs and on Getting Started page in particular.

Tutorials/Articles

You can also check the following articles:

Contact

Feel free to ask any questions regarding Atata Framework. Any feedback, issues and feature requests are welcome.

If you faced an issue please report it to Atata Issues, write to Atata Gitter or just mail to [email protected].

Links

Author

Contact me if you need a help in test automation using Atata Framework, or if you are looking for a quality test automation implementation for your project.

License

Atata is an open source software, licensed under the Apache License 2.0. See LICENSE for details.

atata's People

Contributors

yevgeniyshunevych avatar

Watchers

James Cloos avatar Stanislav O Chernykh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.