Skip to content

Features

Viewing tests in the operator panel

The operator panel allows you to view the test hierarchy with test folder/test file/function levels. User can launch operator panel using hardpy run command.

Running tests

Based on pytest HardPy allows you to run pytest tests in the browser or command line. For running tests in browser run tests using hardpy run command.

hardpy run

and press the Start button. Alternatively, the user can start the operator panel with the “Start” button and run tests with pytest.

python -m pytest

The user can also run tests without the operator panel, just through pytest. This method may be appropriate if the user does not need the operator panel.

Stopping the tests

The user can stop the tests during execution from the operator panel by clicking on the Stop button. It is possible to stop tests from the console by sending an interrupt, e.g. “Ctrl-C” in Linux.

Storing test result in database

HardPy does not allow you to run tests without a running CouchDB database. This is a NoSQL database that ensures that the results of the current test run are committed, even if the tests are aborted early.

To save the report history, the user must configure the conftest.py file using the CouchdbLoader or another adapter to save the data. By default, only the current report in the runstore database is stored in CouchDB.

An example of configuring conftest.py to store test run history can be found in several examples, including the couchdb_load and minute_parity.

Creating template project

The HardPy can create template project using the hardpy init command. An example of usage can be found in the how to init section among the examples, e.g. in minute parity.

hardpy init minute_parity

Interacting with tests in the operator panel

The user can interact with the tests through dialog boxes in the operator panel. HardPy provides the ability to enter text or numbers, make selections using checkboxes or radio buttons, guide the user through multiple steps in a single window, display images to the user, and insert HTML components into the dialog box using iframes.

In dialog boxes, the user must confirm their action by clicking the Confirm button. Closing the dialog box prematurely will abort the test.

If the user only needs to provide information, an operator message can be used. Unlike dialog boxes, the user cannot enter any information, only close the window. User can also close the operator message from within the test code and run it in non-blocking mode, so that displaying the window does not stop the test.

Running multiple test attempts

The HardPy allows the user to attach an attempt marker to a test, which allows the test to be repeated as many times as specified in the marker's content in the event of failure.

Skipping the tests

The HardPy allows the user to skip tests on dependency markers. The user can specify that a test or an entire module depends on another test. In this way, tests can be defined whose failure will prevent the marked tests from running.

Running some instance in single stand

A user can run multiple HardPy instances on a single stand. The startup is described in the Multiple Stand example.

Storing test result to StandCloud

HardPy allows you to send test results to StandCloud, a data storage and analysis platform. See the StandCloud section and the StandCloud example for more information.