Code Monkey home page Code Monkey logo

tierra_qa's Introduction

tierra_qa

tierra_qa is a package that aims to find a new repeatable pattern for black box QA testing applied to any web application.

It is internally based on:

  • py.test
  • pytest-selenium
  • pytest-bdd
  • optionally on pytest-docker (TODO)

In the next future we'll provide a generic package generator for easy setup of testing.

Why py.test

py.test is one of the most promising test frameworks built with Python. It is a generic framework, so it is not bound to the BDD practise. So if you are going to test a Python based application, you'll have a unique BDD tool integrated with the unit, integration and functional tests running just only a command.

It provides a clever dependency injection mechanism for fixture creations and its focus is minimizing the amount of test code, reusability and modularity.

More links:

How to install it

Prerequisites:

  • python-dev
  • virtualenv
  • Firefox, Chrome, etc

Clone the tierra_qa package and run:

$ python setup.py develop

How to use it

Once installed you can launch tests with:

$ py.test --driver Firefox [--base-url http://anotherurl.com/] --credentials="USERID1;USERNAME1;PASSWORD1|..."

With the --credentials parameter you can specify different multiple user credentials splitted by a | character where:

  • USERID1, stands for the user identifier used in test cases
  • USERNAME1, stands for the username used for login
  • PASSWORD1, password associated to the above username

The USERID1 will be used in order to mark tests if you want an authenticated session, for example::

import pytest

@pytest.mark.user('USERID1')
@pytest.mark.nondestructive
def test_login(loggedin_selenium):
    # you'll have a selenium session authenticated with the USERID1
    assert 1

By default the default base_url is http://tierratelematics.com/ and it is specified on setup.cfg file. If you provide multiple --base-url parameters your test suite will be automatically repeated against different environments (using same credentials).

How to create your own qa package

Once you have installed tierra_qa you can create your own package typing the following command:

  • tierra_qa_clone YOURPACKAGE_QA

tierra_qa's People

Watchers

James Cloos 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.