Code Monkey home page Code Monkey logo

test-definitions's Introduction

Test Definitions

A test suite works with and without LAVA. The following two sets of automated tests are supported.

  • automated/linux/
  • automated/android/

For each test case, both the test script and the corresponding test definition files are provided in the same folder and are named after the test case name. Test scripts are self-contained and work independently. Test definition files in YAML format are provided for test runs with local test-runner and within LAVA.

Installation

Installing the latest development version:

git clone https://github.com/Linaro/test-definitions
cd ./test-definitions
. ./automated/bin/setenv.sh
pip install -r ${REPO_PATH}/automated/utils/requirements.txt

If the above succeeds, try:

test-runner -h

Running test

Running test script

linux

cd ./automated/linux/smoke/
./smoke.sh

Skip package installation:

./smoke.sh -s true

android

cd ./automated/android/dd-wr-speed/
./dd-wr-speed.sh

Specify SN when more than one device connected:

./dd-wr-speed.sh -s "serial_no"

Specify other params:

./dd-wr-speed.sh -i "10" -p "/dev/block/mmcblk1p1"

Using test-runner

single test run

test-runner -d ./automated/linux/smoke/smoke.yaml

skip package install:

test-runner -d ./automated/linux/smoke/smoke.yaml -s

running test plan

Run a set of tests defined in agenda file:

test-runner -p ./plans/linux-example.yaml

Apply test plan overlay to skip, amend or add tests:

test-runner -p ./plans/linux-example.yaml -O test-plan-overlay-example.yaml

Collecting result

Using test script

Test script normally puts test log and parsed results to its own output directory. e.g.

automated/linux/smoke/output

Using test-runner

test-runner needs a separate directory outside the repo to store test and result files. The directory defaults to $HOME/output and can be changed with -o <dir>. test-runner converts test definition file to run.sh and then parses its stdout. Results will be saved to results.{json,csv} by test. e.g.

/root/output/smoke_9879e7fd-a8b6-472d-b266-a20b05d52ed1/result.csv

When using the same output directory for multiple tests, test-runner combines results from all tests and save them to ${OUTPUT}/results.{json,csv}. e.g.

/root/output/result.json

Contributing

Please use Github for pull requests: https://github.com/Linaro/test-definitions/pulls

https://git.linaro.org/qa/test-definitions.git is a read-only mirror. New changes in the github repo will be pushed to the mirror every 10 minutes.

Refer to test writing guidelines to modify or add test.

Changes need to be able to pass sanity check, which by default checks files in the most recent commit:

./sanity-check.sh

To develop locally, there are Dockerfiles in test/ that can be used to simulate target environments. The easiest way to use is to run test.sh [debian|centos]. test.sh will run validate.py, and then build the Docker environment specified, run plans/linux-example.yaml, and then drop into a bash shell inside the container so that things like /root/output can be inspected. It is not (yet) a pass/fail test; merely a development helper and validation environment.

test-definitions's People

Contributors

algodev-github avatar chase-qi avatar ciprian-barbu-linaro avatar danrue avatar embeddedandroid avatar esla avatar fboudra avatar hrw avatar igaw avatar iwamatsu-t avatar kateyy avatar liuyq avatar luislinaro avatar michalsimek avatar mike-holmes-linaro avatar mrchapp avatar muvarov avatar nareshgbhat avatar nareshkamboju avatar ndechesne avatar oterenti avatar ravineet-singh avatar roxell avatar shawnguo2 avatar stevecapperlinaro avatar stylesen avatar vincenthsu avatar vingu-linaro avatar vireshk avatar vishalbhoj avatar

Watchers

 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.