Commit Graph

37 Commits

Author SHA1 Message Date
Andreas Jaeger 8c881bcbe5 Retire repository
See
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007708.html

Change-Id: If97f10290c16903d550c66163b082bd23357fca2
2020-05-08 13:51:25 +02:00
Michael Dong 6cf7bdab87 Bug fixes and error message updates
Fixes:
1) Crashes in runner and file_utils
2) Binary strings being read in as payloads

Updates:
1) Clarified error messages in parser
2) Confusing variable names in test cases vs issues

Adds:
1) A `syntribos root` CLI sub command to display the current syntribos root dir

Change-Id: I22edf7a1f3d39724522aee88d08b00d299b67248
2018-11-28 12:32:24 -06:00
Michael Dong c4586a374b Improve performance by multithreading test calls
This change:
1) rewrites the runner to spawn a thread pool for each template
   and assigns a worker for each test case
2) makes the output colorized by default
3) makes minor changes to the output

Change-Id: I49906f5daaa339ca9429913680203c762a0ad9fe
2017-09-18 13:23:00 -05:00
Michael Dong 5d7771fb8e Added meta variable support to runner
The runner will now respect inheritence when passing meta variables
to the parser.

Change-Id: I84ae827fcb396a1cb701d212601a8dcd56a37d9e
2017-03-13 14:43:49 -05:00
Michael Dong c5a4dd083d Added support for meta variable JSON files
Syntribos now allows the user to specify variables in their request
templates by reading from a meta.json file. This is part 1 of 3 of
the full effort, dealing primarily with the template parser itself.

Change-Id: Id41d331f595cd3bc32f085ef49cb5d1b16779a5c
2017-01-27 11:03:39 -06:00
Charles Neill b80f2ca802 Fix BaseTestCase bug
Fixes a bug in BTC that causes syntribos to send the same init_req over
and over, meaning that only the first template specified actually gets
executed.

Change-Id: I9df3de8ae8ac305d67428afc9c029d2145788b53
Closes-Bug: #1635747
2016-10-21 18:14:36 -05:00
michael.dong@rackspace.com a82694d53c Modified dry_run to run debug test
Wrote empty debug test as a replacement for dry_run. dry_run no longer executes
any test code, or send any requests. Rather, it serves only to check that the
template file and all external calls inside the template are parsed and run
correctly.

Change-Id: I1cd817476c9ca4bd27b013dcdbd0cbce334847c4
2016-10-21 00:07:57 +00:00
michael.dong@rackspace.com e442dc8f6d changes to runner and result
1) results are now printed at the end of the run or on interrupt, not after
every template
2) made test_id's globally unique
3) print number of errors next to number of failures
4) number of failures printed after next to each progress bar and reported
in total at end of run now match up

Change-Id: I28617c64218ab632c1a35083ef9351874054a26d
2016-08-25 14:37:06 -05:00
Rahul Nair 0009bf49ce Adding unique_id to tests
Adding a simple counter based id to tests to track them in debug
log and results log. Also, this patch improves the result output
like adding a progress bar and uniform test names..

Change-Id: Ib83181b25a0c18c7993f491cde98d73555b01404
2016-08-04 20:22:17 +00:00
Jenkins fc1c207040 Merge "Adding additional fields to debug log" 2016-08-04 16:07:31 +00:00
Charles Neill 95ed57ca94 Removes FuzzRequest from Syntribos
- This removes FuzzRequest as a type of RequestObject. All requests are
  now RequestObjects, and are parsed by the
  syntribos.clients.http.parser
- Fuzzing a request is now done via
  syntribos.tests.fuzz.datagen.fuzz_request()
- Moved _remove_attr_names and _remove_braces to the RequestObject
- Added unittests for fuzz datagen, http client models

Change-Id: Ib589c34ad80da58daab875d7383210d22d82d764
2016-08-03 01:15:38 +00:00
Aastha Dixit 6b449c7182 Adding additional fields to debug log
Adding metadata, stats on http requests and response. Also, adding
checks and signals used by a test to the debug log.

Change-Id: I3b85d50804f1071383dfa4b9a07235926018338c
2016-08-01 18:20:48 -05:00
Charles Neill 879a76a488 Renaming BaseTestCase/BaseFuzzTestCase methods
This updates the BTC/BFTC class methods based on the changes we agreed
on in our 7/13 meeting.

Details here: https://etherpad.openstack.org/p/syntribos-planning

Change-Id: I05e426ee1832385ec42d64ba930caea9ddd5374f
2016-07-29 14:55:27 -05:00
michael.dong@rackspace.com 58d3db7bf4 Added signals to results output
Currently, no signals are printed with the output, so now, the slugs of signals
associated with each issue are now printed in the results output. We may
revisit this to add strengths and tags should they be needed in the future.

Change-Id: Ib58127a9d6bb296b9731668e957c15e5c2ef71f4
2016-07-28 12:16:49 -05:00
Charles Neill 3a9e6b62d0 First pass at fix for bug #1604187
There are differences between requestslib's PreparedRequest and
Syntribos' RequestObject, which can cause problems when they are used
inconsistently.

This is a first pass at a fix, editing BaseTestCase's send_init_request
to add the body to the test.init_req object.

Change-Id: I6f71fb52bca2f1cccdbdbce5f081431a0750db66
Partial-Bug: #1604187
2016-07-18 18:30:19 -05:00
Rahul Nair dcdcda3dde Modifying checks to use test objects
Check modified to use test objects.

Change-Id: I110a7609fc172f03998a201ca6975af26f1003c3
2016-07-18 15:48:56 -05:00
Charles Neill a8a9ac6e37 Converting to oslo.config for configuration
- Merges arguments.py and and existing config.py files into one file
- Removes dependencies on cafe.* config file / CLI parsing
- Adds "register_opts" to BTC to allow Tests to specify config options
- Moves us completely from cclogging to Python logging

Change-Id: I0d4a84563d54307c94c0064be429919f9d91d67b
2016-07-11 11:52:51 -05:00
Charles Neill 70c62a0c0b Refactoring BaseTestCase/BaseFuzzTestCase
- Removed unnecessary code from BTC
- Moved some components from BFTC to BTC
- Start using signals for all tests
- Renamed several variables in BTC for clarity
- Cleaned up BaseAuthTestCase somewhat

Change-Id: I3efc44b33aa4416e1f9853910485a8c5703a9057
2016-07-05 15:42:01 -05:00
Jenkins 2a9b565315 Merge "Added CORS Header testcase" 2016-05-19 21:11:34 +00:00
Rahul U Nair e60bfa5271 Added CORS Header testcase
CORS header `Access-Control-Allow-Origin` should be a whitelist
of URIs. This testcase checks if a wildcard is set instead.

Partially implements: blueprint test-headers

Change-Id: I0f16a3f0843b6c828d40994dd1be4f4c86455371
2016-05-18 18:38:37 -05:00
michael.dong@rackspace.com 3477b2f7be Moved extend_class() function
Extended the extend_class() method from BaseTestCase in BaseFuzzTestCase, as
only BaseFuzzTestCase should have fuzz_string and param_path as parameters to
the method.

Change-Id: If39629caed9d9659bb4c7c39eb8199b25610b5b1
2016-05-18 17:32:13 -05:00
Charles Neill 679cfd5d2f Docstrings for more Syntribos components
Adding a few more docstrings, populating code-docs page, modifying
Sphinx documentation generation.

Implements: blueprint docstring-add-to-framework
Change-Id: I9506c9fdeab19d9b4bf52ee3a51c27e38476e82e
2016-05-02 17:00:24 -05:00
Charles Neill 921157a4d6 Change license from block quotes to '#'s (Sphinx)
We are currently using block quotes for license comments, which means
that Sphinx pulls this into every module, which is bad. Hash-prefixed
comments for licenses seem to be the standard for OpenStack as well.

Change-Id: Iabc60228c1201a960f672e1b0c7ab3c5312c9d8e
Implements: blueprint docstring-add-to-framework
2016-04-14 18:17:40 -05:00
michael.dong@rackspace.com 533fa8f011 Issues now conform to Syntribos test schema
Based on https://github.com/cneill/syntribos-schema/blob/master/test_schema.md,
Issues now encapsulate the information as discussed in the test schema.

Change-Id: Ifc29062c1e4f3cea306b6cc3aae64efe8e1c532a
2016-04-07 18:33:16 -05:00
Charles Neill 9eca39e127 Updating doc strings for core pieces of Syntribos
This PR adds docstrings to a number of important components of
Syntribos, and adds this documentation to our Sphinx doc structure. It
also removes copyrights from __init__.py files with no other content,
in line with OpenStack style guidelines.

Set 2: Fixed PEP8 failure.

Change-Id: Ic57b31f451ec3ecf7f5b308da4544f808c9c9a5d
Implements: blueprint docstring-add-to-framework
2016-04-05 16:20:56 -05:00
michael.dong@rackspace.com 3fff915563 Test logic is no longer written in terms of assertions
Changes to the framework are only found in runner.py and base.py.

Tests are now no longer written as lists of assertions, which before meant that
it was impossible to access any variables used in the test itself after the
test was over. Instead, the register_issue method now adds the issue to
cls.failures, and will throw an AssertionError if there are any failures
reported to the test runner. This will allow us to do things like put the
failure string into the Issue description.

Change-Id: Ic3ca2ec48a6e1d99d56e605a2e0d0dc89158bc72
Implements: bp/framework-issue-creation
2016-03-29 17:58:45 -05:00
Jenkins 92f8dd4f5f Merge "Results aggregation" 2016-03-09 15:42:09 +00:00
Michael Dong ec54af8d32 Results aggregation
Issues are now only reported once for each URL and HTTP method

Change-Id: Icd711d3e0d735d030c785d0220bdaaf4a42e07e4
2016-03-08 13:26:30 -06:00
michael.dong@rackspace.com a7b22cf4e4 Wrote docstrings
Change-Id: I804b3fbb50cb0ec835b50984881d14976a41784b
2016-02-09 12:54:42 -06:00
Michael Dong 4d02e013b2 Moved 2 functions from BaseFuzzTestCase to BaseTestCase
Registering an issue and testing that issue should be universal to
all test cases, not just fuzz test cases.

Change-Id: Idd09819475f68d99a8d0d491daac4e03e286a321
2016-01-29 10:32:05 -06:00
Michael Xin ee5f6b8d4b Change styles to Pep8 compliant
Change-Id: Ic34eb22aad66766f0140087d39b313014533935f
2015-12-22 15:25:50 -06:00
michael.dong@rackspace.com 7e4d3560d4 added license and changed rax-auth extension to identity 2015-08-19 15:50:39 -05:00
Nathan Buckner d88696924a update 2015-07-12 16:39:12 -05:00
Nathan Buckner ac9ddfff06 update 2015-07-10 12:26:11 -05:00
Nathan Buckner 3762442fee update 2015-07-09 11:16:21 -05:00
Nathan Buckner a4dbd8d986 update 2015-07-08 12:58:31 -05:00
Nathan Buckner 3d3b3f44ee added auth, request parser, sql_tests 2015-07-07 23:24:59 -05:00