Qa-tools: Difference between revisions

From Yocto Project
Jump to navigationJump to search
Line 22: Line 22:
=== Structure ===
=== Structure ===


This tool allows to create a test run based on Templates already defined for every release, and based on that the tool is able to create the appropiate test run by cloning the exiting template and generating a new Test Run that will show the results of the test execution. Tool consist in a python script that can be used for different actions and with different parameters, with a configuration file to get connected to the Testopia DB and then using the Testopia API to perform different actions on the DB.
This tool allows to create a test run based on [ Templates already defined for every release, and based on that the tool is able to create the appropiate test run by cloning the exiting template and generating a new Test Run that will show the results of the test execution. Tool consist in a python script that can be used for different actions and with different parameters, with a configuration file to get connected to the Testopia DB and then using the Testopia API to perform different actions on the DB.


The structure is as follows:
The structure is as follows:

Revision as of 18:27, 9 March 2017

Summary

The qa-tools git repository is the recipient for the QA automation scripts and tools. Is inteended to store any tool that helps on the QA activities related to the Yocto Porject


You can take a look at it via the gitweb interface.

For cloning the qa-tools repository:

$ git clone git://git.yoctoproject.org/qa-tools

List of Tools

Below is a list with detailed information about the tools/scripts already implemented

testopia_update

Objective

This tool was designed to give an automated way to interact with Testopia activities.

Structure

This tool allows to create a test run based on [ Templates ] already defined for every release, and based on that the tool is able to create the appropiate test run by cloning the exiting template and generating a new Test Run that will show the results of the test execution. Tool consist in a python script that can be used for different actions and with different parameters, with a configuration file to get connected to the Testopia DB and then using the Testopia API to perform different actions on the DB.

The structure is as follows:

-> qa-tools/ 
  |-testopia_update.py: Main script 
  |-testopia_update.config : Configuration file with the URL and the login info to the Testopia DB
  |-> testopia_update/
     |- __init__.py
     |-> product/ : This directory contains all the available products used by QA on Testopia                
  |-> External/
     |- testopia.py: This file contains the API that provides methods to work on Testopia DB.

How to use it

1- Clone repo

2- Install Virtual Environment tool

$ sudo apt-get install python-virtualenv

3- Create virtual environment

$ virtualenv venv

4- Activate virtual environment

$ source venv/bin/activate

5- Create configuration file, there is already a configuration file example that can be used

testopia_update.config.example [snapshot]

[Testopia]
url = TESTOPIA URL - https://bugzilla.yoctoproject.org/xmlrpc.cgi 
username = someuser - Bugzilla user
password = verysecurepass - Bugzilla pswd
store_location = /tmp/testopia_update

6- Install requirements

$ pip install -r requeriments.txt

7- Start using the testopia_update.py script


Below is a brief explanation of each one of the parameters available for the script:


-h, --help

Show this help message and exit

--config

Configuration file with the updated data to get connected to the Testopia DB

--url

URL of Testopia instance. This is used in case a configuration file is not being specified

--username

Username of Testopia instance. This is used in case a configuration file is not being specified

--password

Username of Testopia instance. This is used in case a configuration file is not being specified

--list-products

List available products. This option retrieves the list of the available products that can be used on Testopia instance

-a --action {create,update}

Action to execute can be create or update. This should be combined with other option check [example] section to see how can be used

-p --product

Product to create or update. This is the name of the product available on Testopia. This should be one of the valid products retrieved when using option --list-products

-c --category {AUTO,MANUAL}

Category for create or update. This represents the way how the Test Cases of the test run are being executed

Examples

Improvments

Proposed tools

This section is intended to add new tools to be implemented

How To Contribute

Contributing to any of the yoctoproject.org repositories, including qa-tools, can be achieved with the Poky Contributions guidelines.

Mantainer Anibal Limon