Git Product home page Git Product logo

stf's Introduction

STF

  • A Simple Test Framework.
  • STF is an automation test framework implemented with Python;
  • STF can be installed via pip install command;

STF key features:

  • Use directory/file to represent a test case/test steps, great benefit writing cases with script(shell, python, Expect);
  • Generate Html report and JUnit xml report for test cases;
  • Get case info from Testcase Management System(e.g. zephyr) and report the case status back to TMS;
  • Reuse code by various modules rather than functions;
  • Can wrap other automation frameworks (e.g. Ansible, Robot...) and user's own private automation framework, easily and intuitively;

STF Arch

STF Arch


STF test view

STF test view usage:

stf test -c <your_case_dir>

STF test view provide 3 kinds of cases:

  1. case directory with case step files;
  2. case directory without case step files;
  3. one single file as a test case;

A STF case must be independent, since other cases may be omitted after apply filter and will not run during test.


STF test view - case directory with case step files

  • In this situation, STF test case use 1-level directory to represent a test case, and use the files in this directory to represent the test steps;
  • STF case directory name format : stf__<tag>__<caseid1~caseid2...>
  • Case step file name format: s<id>__<module>[~<parameter>]__<tag>

STF test view - case directory without case steps

  • In this situation, STF test case use a directory to represent a test case, and you can put any files in this directory;
  • STF case directory name format : stfs<id>__<module>__<tag>__<caseid1~caseid2...>

STF test view - one single file as a test case

  • In this situation, STF test case use a single file to represent a test case;
  • STF case file name format : stfs<id>__<module>__<tag>__<caseid1~caseid2...>

STF format explanation

  • <id> is [1-99999], but the number itself has no special meaning;
  • <module> is <script | vlab | playbook | robot | copy | env>;
  • <tag> is characters you name this case to reflect its' content;
  • <caseid1~caseid2...> is the zephyr JIRA ID;

A STF test view example

With the ability above, stf can create OpenStack instances and run cases on them intuitively:

  1. stfs1__vlab~ins1__create__tag1
  2. stfs2__script~ins1__run__tag2
  3. stfs3__vlab~ins1@d__delete__tag3

STF Standard output

  • is similar with CGI or fastCGI

STF with C++ coverage

stf can also help to inject gcov parameters:

stf gcov -b make all

#Now you can run your program which will generate gcda files

stf's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  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.