AAF ― Applicita LTD
  • Getting Started
  • Development
    • Key Objectives
    • Development Environment & OS
    • Architecture
    • Visual Studio Solution
    • Setup for Local Development
      • Docker & Kubernates
      • Visual Studio Host Builder
  • Web
    • Feature
      • Authentication and Authorization
        • Sign up
        • Sign In
        • Sign out
        • Remember me
        • Recovering password
      • Tenant management
        • Create tenant
        • Search tenant
        • Tenant page
          • Change basic information
          • Change administrator
          • Change branding
          • Change style
          • Change status
          • Assets
        • Delete tenant
      • User management
        • Create user
        • Search user
        • Send email
        • User page
          • Editing page sections
          • Change basic information
          • Change profile picture
          • Change role
          • Change status
        • Delete user
        • Reset users password
      • Role management
        • Create role
        • Search role
        • Role page
          • Change basic information
          • Change status
          • Revoke role
          • Change permissions
          • Interactive permissions button
        • Delete role
      • Bug reporting
  • Testing
    • Testing Environment
    • Atata
    • Architecture
      • Feature structure
      • Common
        • Attributes
        • Components
        • Controls
        • Fixtures
        • Generators
    • Example
Powered by GitBook
On this page
  • Base Fixture Configuration
  • Driver Reuse TestFixture
  • Auto-Login TestFixture
  • Save Cookies TestFixture

Was this helpful?

  1. Testing
  2. Architecture
  3. Common

Fixtures

PreviousControlsNextGenerators

Last updated 5 years ago

Was this helpful?

Fixtures used by all of the tests are defined in this section

Base Fixture Configuration

BaseFixtureConfiguration is base class which configures and builds AtataContext with settings defined in settings.json file.

Driver Reuse TestFixture

DriverReuseTestFixture has a constructor which you can use to define if you want driver to start a new browser instance for each test or reuse the same instance.

Reusing browser instance is convenient because you can login once and then start all your tests after that.

Auto-Login TestFixture

AutoLoginTestFixture is used for tests which require login to happen first. Simply inherit from this fixture and then define your own tests. AutoLoginTestFixture inherits from DriverReuseTestFixture and reuses the same driver instance by default.

Save Cookies TestFixture

SaveCookiesTestFixture is used to save the cookies when you use the RememberMe functionality on the login page. Extracted cookies can be loaded into browser instance when needed on tests inheriting from this fixture.

Example of loading extracted cookies:

[Parallelizable(ParallelScope.Children)]
public class PasswordRecoveryPageTests : SaveCookiesTestFixture
{
    [Test]
    public void PasswordRecoveryCompletePage_Back_To_SelectUserPage_Should_Work()
    {
        AtataContext.Current.Driver.LoadExtractedCookies();
        Pages.PasswordRecoveryPage()
            .SendInstructionsToValidEmail()
            .BackToSelectUserPage();
    }
}
Fixtures section