Skip to main content

Ochrus Project Overview

The Ochrus Project is intended to be a complete solution to easily develop functional (black/gray box) automation tests.

The Ochrus Project include the following components:

  1. ochrus: Classes and modules to support functional automation tests

  2. ochrus-srv: Detailed result DB server.

  3. pytest-ochrus: Pytest plugin, see note below…

NOTE: Ochrus Project choose Pytest (https://www.pytest.org) open source project as its testing framework.

Pytest is an easy to use and powerful testing framework that support the most common Python unit framework such and “unittest” and “Nose”.

Ochrus library:

Provide classes and modules to support functional automation tests Should be used with the power of Pytest framework. documentation should be available soon at the wiki and later at: http://www.ochrus.com

To install:

$ pip install ochrus

pytest-ochrus:

A Pytest plugin, it needs to be installed with Pytest It uses to send test results to the ‘ochrus-srv’ (see below) via REST protocol (code: https://github.com/ochrus/pytest-ochrus)

To install:

$ pip install pytest
$ pip install pytest-ochrus

Ochrus Server:

Ochrus Server is a full-stack free application that include a data-base to hold the test results, and HTML interface to display the results. User can see colorized online results, results history and comparison. The server support RESTful API and currently only pytest-ochrus is available to communicate with it, but actually it can serve any xUnit framework written in any language.

To install:

The server is available as Docker image and can be run directly from docker hub as followed:

$ docker run -d -p 80:8000 -v db:/ochrus/db --name ochrus_srv ochrus/ochrus_srv:demo

Requirements

  • Python 2.7

  • pytest

  • Docker (on host server only)

Installation

Client:

$ pip install pytest
$ pip install pytest_ochrus
$ pip install ochrus

Server:

Followed the instructions at: https://docs.docker.com/engine/installation/ to install Docker on your host server.

e.g.: for CentOS:

$ yum install -y yum-utils device-mapper-persistent-data lvm2
$ yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
$ yum install docker-ce
$ systemctl start docker      #run the service
$ systemctl enable docker     #make it start on boot

To install ‘ochrus_srv’ run the following command:

$ docker run -d -p 80:8000 -v db:/ochrus/db --name ochrus_srv ochrus/ochrus_srv:demo

The above Docker command will do the following:

  1. Download the ‘ochrus_srv:demo’ image from the Docker public Hub.

  2. Run it at the background and give it the name ‘ochrus_srv’.

  3. Expose its 8000 port to port 80 on the running host.

  4. Create a persistent data-base at default Docker volume location at: ‘/var/lib/docker/volumes/db/’

NOTE:

  1. The above docker command should be run only once, after that run:

docker stop ochrus_srv   to stop the server
docker start ochrus_srv  to run the server
  1. Make sure port 80 is free at the host server.

Execute:

At the Client:

  1. To run your tests: just run pytest according to pytest execution instructions.

  2. You can give a name to the running session as followed:

$ pytest --session_name="mySessionName"

The name will be displayed at the HTML report at the ochres server

NOTE: You can give any name that will describe the running session

Recommended: *product_name-version_number.build_number*

Using Eclipse IDE

Note: Following instructions are taken with: Eclipse Oxygen.1a Release (4.7.1a)

  1. Install Eclipse IDE

  2. Run Eclipse and install ‘*pydev*’ plugin.

    Go to: *Help | Eclipse Markeplace…*, write ‘*pydev*’ at the Search box and click the ‘Go’ button.

    Wait until it find the Pydev plugin and click the ‘Install’ button

  3. Create a new Pydev project (*File | New | Other…* | PyDev | PyDev Project)

  4. Go to: *Windows | Preferences | PyDev | PyUnit | Test Runner* | choose: Py.test runner, click Apply

  5. Create a pytest script and run it by right-click and choose Run As | Python unit-test

  6. To run all tests in a special directory, just right-click the directory and choose Run As | Python unit-test

Metadata

Release files for ochrus 0.0.61

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ochrus 0.0.61
File Size Uploaded
ochrus-0.0.61.tar.gz 13.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ochrus 0.0.61
File Interpreter ABI Platform
ochrus-0.0.61-py2-none-any.whl Python 2 none any Details

Total release size: 30.8 kB

Release files / ochrus-0.0.61.tar.gz

Download URL ochrus-0.0.61.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2fdaa963664430f84571c37294fcbb6be52398b9f25b064a9101f04371182e21
BLAKE2b-256 checksum
How to use checksums
7d9d7dff073dd6589ad489400b27d56980163565b37e34cae8be37af64ee34e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/2.7.15

Release files / ochrus-0.0.61-py2-none-any.whl

Download URL ochrus-0.0.61-py2-none-any.whl
Size 17.6 kB
Tags Python 2
SHA-256 checksum
How to use checksums
e8b168cf8cce2c5da7e27fc9ea4a23a89e5ec1ab00a0e8b797c473bb94a92a44
BLAKE2b-256 checksum
How to use checksums
e170eb6609e3c9e46fb5fc0605d51bf0586b9930e049ee563f2937132908b0db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/2.7.15

Release history Release notifications | RSS feed

This release

0.0.61 This release

2 release files

0.0.6

1 release file

0.0.5

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page