Git Product home page Git Product logo

wdio-testdeck-allure-examples's Introduction

WDIO examples

This repository is an example of a basic UI-test for GitHub, based on WDIO framework and ts-test-decorators concept.

Decorators were a bit updated as mocha-typescript was deprecated in favor of a new testdeck library.

Sample test case written in OOP-manner:

@suite
class GitHubAuthTests {
  static authData = (): User[] => [new User(process.env.USERNAME, process.env.PASSWORD, process.env.FULL_NAME)]

  @severity(Severity.BLOCKER)
  @issue('ID-123')
  @testCaseId('ID-456')
  @feature('Authorization')
  @story('Implement GitHub login page.')
  @data(GitHubAuthTests.authData)
  @data.naming((user: User) => `${user.fullName} should be able to sign`)
  @test
  public userShouldBeAbleToSignIn(user) {
    open(GuestPage).signInWith(user).expandProfileMenu()
    verifyThat(atHomePage).usernameIs(user.username)
  }
}

Installation

Preparations:

docker pull aerokube/selenoid:latest-release
docker pull aerokube/selenoid-ui:latest-release
docker pull selenoid/vnc:chrome_81.0
git clone https://github.com/sskorol/wdio-testdeck-allure-examples.git
cd ./wdio-testdeck-allure-examples
npm install
docker-compose up -d

Add required environment variables (use a preferred editor):

nano .env
HOST=github.com
USERNAME=yourGitHubId
PASSWORD=yourGitHubPassword
FULL_NAME=yourFullName
CTRL+o
ENTER
CTRL+x

Update ./src/resources/allure.properties with your own information:

allure.issues.tracker.pattern=https://path.to.your.tracker/browse/%s
allure.tests.management.pattern=https://path.to.your.tms/browse/%s

Execution and Reporting

Run existing test in a docker container:

npm run test

Generate and render Allure report:

npm run allure-report

wdio-testdeck-allure-examples's People

Contributors

dependabot[bot] avatar sskorol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.