Git Product home page Git Product logo

testfm's Introduction

TestFM

https://api.travis-ci.org/SatelliteQE/testfm.svg?branch=master https://requires.io/github/SatelliteQE/testfm/requirements.svg?branch=master

TestFM is a test suite based on pytest-ansible that exercises The Foreman maintenance tool

Quickstart

The following is only a brief setup guide for TestFM. The section on Running the Tests provides a more comprehensive guide to using TestFM.

TestFM requires SSH access to the server system under test, and this SSH access is implemented by pytest-ansible.

Get the source code and install dependencies:

git clone https://github.com/SatelliteQE/testfm.git
pip3 install -r requirements.txt

Before running any tests, you must create a configuration file:

cp testfm.sample.yaml testfm.local.yaml
OR
cp testfm.sample.yaml testfm.yaml

There are a few other things you need to do before continuing:

  • Make sure ssh-key is copied to the test system.
  • Make sure satellite maintain is installed on foreman/satellite server.

Running the Tests

Before running any tests, you must add foreman or satellite hostname to the testfm/inventory file (first copy it from`testfm/inventory.sample`).

That done, you can run tests using pytest

pytest -v --ansible-host-pattern server --ansible-user=root  --ansible-inventory testfm/inventory
tests/

It is possible to run a specific subset of tests:

pytest -v --ansible-host-pattern server --ansible-user=root --ansible-inventory testfm/inventory
tests/test_case.py

pytest -v --ansible-host-pattern server --ansible-user=root  --ansible-inventory testfm/inventory
tests/test_case.py::test_case_name

Want to contribute?

Thank you for considering contributing to TestFM! If you have any question or concerns, feel free to reach out to the team.

Recommended

  • Import modules in alphabetical order.
  • Every method and function will have a properly formatted docstring.

In order to ensure you are able to pass the Travis CI build, it is recommended that you run the following commands in the base of your testfm directory

pre-commit autoupdate && pre-commit run -a

Pre-commit will ensure that the changes you made are not in violation of PEP8 standards.

If you have something great, please submit a pull request anyway! The full documentation is available on ReadTheDocs.

Licensing

TestFM is licensed under GNU General Public License v3.0.

testfm's People

Contributors

ntkathole avatar gauravtalreja1 avatar jameerpathan111 avatar shubhamsg199 avatar pondrejk avatar dependabot-preview[bot] avatar dependabot[bot] avatar mshriver avatar vsedmik avatar sghai avatar akhil-jha avatar jyejare avatar lvrtelov avatar omkarkhatavkar avatar swadeley avatar tstrych avatar

Watchers

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