<commit_before>rannsaka
========

mayhem-generation and analysis tool for testing

rannsaka?
---------

It is what google translate says is Icelandic for 'probe' ;)

Design
-------

This tool is designed to produce stressful, randomized workloads
for openstack systems.

It leverages locust.io for general test execution and would-be testers
create locust files that model the behavior to be tested.

The tool should serve a similar purpose as the random query generator
does for database systems.

The idea is that complex system cannot be adequately tested via
individually crafted test-cases.  This is because human validation
is time and brain intensive and several projects' experience has been
that such tests are often shallow.  By utilizing software to better
emulate random, real world workloads, more bugs can be found before
making their way to the end user.

This is not intended to replace other testing tools.
One may think of it as a tool to help generate more formal test cases
for the regression suite - fishing with dynamite, as it were.

Future work
------------

- API calls for more openstack functions
- Validation modules that can be turned on / off for requests
- Utilization of core tempest code (config, logging, tempest libs)

::

    usage: rannsaka.py [-h] [--config CONFIG_FILE] [--test-file WORKER_CONFIG]
                       [--host LOCUST_HOST] [--requests REQUEST_COUNT]
                       [--workers WORKER_COUNT] [--verbose] [--debug]
    
    ransakka.py: API probe / testing tool for OpenStack projects

    optional arguments:
      -h, --help            show this help message and exit
      --config CONFIG_FILE  File defining test credentials, etc for rannsaka to
                            use. NOT YET IMPLEMENTED
      --test-file WORKER_CONFIG, -t WORKER_CONFIG
                            locust file to execute
      --host LOCUST_HOST    Test host
      --requests REQUEST_COUNT
                            Total number of requests to make across all workers
      --workers WORKER_COUNT, -w WORKER_COUNT
                            Number of workers to use for test execution.
      --verbose, -v         Controls internal output. Utilize multiple times to
                            increase output
      --debug, -d           Controls debug output. NOT YET IMPLEMENTED
    
    
    python rannsaka.py --host=http://127.0.0.1 --requests 50<commit_msg>Updates to README<commit_after>rannsaka
========

mayhem-generation and analysis tool for testing

rannsaka?
---------

It is what Google translate says is Icelandic for 'probe' ;)

Design
-------

This tool is designed to produce stressful, randomized workloads
for OpenStack systems.

It leverages locust.io for general test execution and would-be testers
create locust files that model the behavior to be tested.

The tool should serve a similar purpose as the random query generator
does for database systems.

The idea is that complex system cannot be adequately tested via
individually crafted test-cases.  This is because human validation
is time and brain intensive and several projects' experience has been
that such tests are often shallow.  By utilizing software to better
emulate random, real world workloads, more bugs can be found before
making their way to the end user.

This is not intended to replace other testing tools.
One may think of it as a tool to help generate more formal test cases
for the regression suite - fishing with dynamite, as it were.

Future work
------------

- API calls for more openstack functions
- Validation modules that can be turned on / off for requests
- Utilization of core tempest code (config, logging, tempest libs)

Usage
-----

::

    usage: rannsaka.py [-h] [--config CONFIG_FILE] [--test-file WORKER_CONFIG]
                       [--host LOCUST_HOST] [--requests REQUEST_COUNT]
                       [--workers WORKER_COUNT] [--verbose] [--debug]
    
    ransakka.py: API probe / testing tool for OpenStack projects

    optional arguments:
      -h, --help            show this help message and exit
      --config CONFIG_FILE  File defining test credentials, etc for rannsaka to
                            use. NOT YET IMPLEMENTED
      --test-file WORKER_CONFIG, -t WORKER_CONFIG
                            locust file to execute
      --host LOCUST_HOST    Test host
      --requests REQUEST_COUNT
                            Total number of requests to make across all workers
      --workers WORKER_COUNT, -w WORKER_COUNT
                            Number of workers to use for test execution.
      --verbose, -v         Controls internal output. Utilize multiple times to
                            increase output
      --debug, -d           Controls debug output. NOT YET IMPLEMENTED
    

Example
-------

::
    
    python rannsaka.py --host=http://1192.168.3.11 --requests 50
{'fraction_non_alphanumeric': 0.06617344841759146, 'fraction_numerical': 0.004110152075626798, 'mean_word_length': 2.335846470185058, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4059005', 'n_tokens_mistral': 1262, 'n_tokens_neox': 1196, 'n_words': 591}