semvec/pypi-packages huggingface dataset:
stf 0.2.4
The simple test framework
License: Apache License, Version 2.0
Keywords: automation test

# 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](https://github.com/nokia/STF/blob/master/images/STF_arch.PNG)

--------
## 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
```
dlcli 0.7.1
Command line utility for Outlyer
License: Apache License, Version 2.0
Keywords: dataloop monitoring

.. _readme:

`Quick Example`_
----------------

install dlcli using pip

.. code-block:: none

    pip install dlcli

set your org, account and api key by creating ~/dlcli.yaml

.. code-block:: none

    ---
    account: account_name
    key: key_from_account_settings
    org: orgname
    url: https://api.outlyer.com/v1

Or you can update the file interactively.

.. code-block:: none

    dlcli set org acme-ltd

.. code-block:: none

    dlcli set account staging

.. code-block:: none

    dlcli set key xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

these get stored in ~/dlcli.yaml so the details only need to be changed when you are switching orgs or accounts

now verify you have a successful connection

.. code-block:: none

    dlcli status

then get a list of all of your agents

.. code-block:: none

    dlcli get agents

fun! this is a work in progress so if you want to collaborate please raise PR's



`Dataloop CLI Tool`_
--------------------

dlcli commands can be thought of as a series of nested commands, with each stage having its own options and flags.

.. code-block:: none

    dlcli [FLAGS] COMMAND [FLAGS] SUBCOMMAND [FLAGS]


The square braces indicate optional elements. Some commands have flags, some do not. Some of those flags are optional, some are mandatory per the command. See the list of commands and flags for more information.

The first thing to know is that help is never far away. You can use the ``--help`` flag at any stage to discover which flags are available:

.. code-block:: none

    dlcli --help

.. code-block:: none

    dlcli COMMAND --help

.. code-block:: none

    dlcli COMMAND SUBCOMMAND --help


Understand that using the ``--help`` flag in between two nested commands will result in the previous level ``--help`` output being shown.


``dlcli --help`` COMMAND will have the same output as ``dlcli --help``, and likewise, ``dlcli COMMAND --help SUBCOMMAND`` will have the same output as ``dlcli COMMAND --help``.


The top-level help output looks like this:

.. code-block:: none
    $ dlcli --help
    Usage: dlcli [OPTIONS] COMMAND [ARGS]...

    Dataloop Command Line Tool

    See https://www.dataloop.io


    Options:
    --debug            Debug mode
    --loglevel TEXT    Log level
    --logfile TEXT     log file
    --version          Show the version and exit.
    --help             Show this message and exit.

    Commands:
    agents      Dataloop Agents



Note that all available flags and commands for this level are shown. This pattern is repeated at each successive level of ``--help``

`Using the API outside of dlcli`_
---------------------------------

You can use the API code outside of the command line utility.

.. code-block:: python

    from dlcli import api
    
    settings = {
        'url': 'https://api.outlyer.com/v1',
        'org': 'org_name',
        'account': 'account_name',
        'key': 'api_key',
    }
    
    print api.agents.get_agents(**settings)
    
Where org_name, account_name and api_key need to be updated with your personal settings.