Code Monkey home page Code Monkey logo

qa-automation-micronaut's Introduction

Build status Build Status

Description

This is a tests automation project that consists of two modules

Technology stack

  • Kotlin - a Next Gen JVM language that makes programming so pleasant process;
  • Micronaut framework used in this project for the following reasons:
    • dependency injection;
    • application configuration properties;
    • http client;
  • Selenide a handy wrapper around Selenium that brings nicer API and makes tests more reliable;
  • JUnit5 for running the tests;

Project structure

├── tests-api
│   └── src
│       ├── main
│       │   ├── ...
│       └── test
│           └── kotlin
│               └── dev
│                   └── serzhshakur
│                       └── api
│                           └── Test.kt
└── tests-web
    └── src
        ├── main
        │   └── ...
        └── test
            └── kotlin
                └── dev
                    └── serzhshakur
                        └── web
                            └── Test.kt

  • API tests are located under tests-api/src/test/kotlin/dev/serzhshakur/api/
  • WEB tests are located under tests-web/src/test/kotlin/dev/serzhshakur/web/

Operating systems' support

  • Linux
  • Mac OS
  • Windows (haven't tested)

Supported browsers

  • Chrome
  • Firefox

Tests execution

IntelliJ Idea

As Micronaut is used in this project you need to enable annotation processing in IntelliJ Idea (look here for more details):

  • Go to File > Settings > Build, Execution, Deployment > Compiler > Annotation Processors
  • check "Enable annotation processing"

In addition build and tests execution should be delegated to Gradle (look here how to do this).

To run a tests from IntelliJ IDEA

  • navigate to a Test.kt class
  • run a separate test or the whole suite. To do that just right click and choose Run 'Test ...'
APPID for Open Weather API

You need a valid APPID for Open Weather API. Check here how to get one. In order to globally set your APPID in IntelliJ do the following:

  • Run > Edit Configurations > Templates > Gradle
  • Add -DapiToken={your_appid} to "VM Options"

Command line

To run test from command line use the following Gradle command

  • API tests
./gradlew clean testApi -DapiToken=[your_appid}
  • WEB tests
./gradlew clean testWeb -Dbrowser=chrome -Dheadless=true

-Dheadless allows to run web tests in headless mode

-Dbrowser possible values chrome or firefox

For Windows machines you must run gradlew.bat instead

Travis CI

This project has integration with travis-ci so each time a new code is pushed to repo a pipeline run on Travis is automatically triggered and the following tests are executed

  • Openweather API tests
  • Wiktionary WEB tests using Chrome browser
  • Wiktionary WEB tests using Firefox browser

The current state of a build is Build Status . You can also see the current status at a top of this readme. A stable Chrome version and latest Firefox version in a headless mode are used for running tests on CI.

Allure reports

After tests have been executed you can generate a pretty Allure reports using the following gradle commands:

./gradlew allureReport
./gradlew allureServe

A report will open in your default browser automatically.

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.