Age | Commit message (Collapse) | Author | Files | Lines |
|
It now reports stats and dumps stream into details.
By the way, it fixes a bug when serializing the former details.
Change-Id: Idd388708071ca3185e5a07bc7e977f2d9837dc95
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
- Simplify processing
- Implement run method to inherit testcase methods
- Add unit tests
- Fix all pylint issues
It also obliges vnf and its uts to be rated 10/10 by pylint.
JIRA: FUNCTEST-830
Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com>
Change-Id: I8dd24eea55089277c9e5b2b51fb14dc377f2fcaf
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
Change-Id: Ie03004474658bd3317a9be8a6b00f5bda1133f2c
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
They replace the former calls in run_tests which are not suitable for all
test cases. Now any test case can define how to clean its resources.
If the snapshot cannot be created, the test case is considered as
failed. Only a message is printed if any failure during cleaning.
It also defines a new class called OSGCTestCase useful for test cases
which don't clean their OpenStack resources.
All test cases located in opnfv_tests/openstack inherit from it to
keep the global behavior unchanged.
It also deletes exit instructions in openstack_clean and
openstack_snapshot, removes clean flags in testcases.yaml and updates
the related utils.
All Docs are modified as well.
JIRA: FUNCTEST-438
Change-Id: I8938e6255708012380389763a24059ace4ce45d8
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
This mangling ensures that all info messages printed from core packages.
Change-Id: I77ac1c80360d45ef19ed7c3fa05a894804c92216
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
Change-Id: Ie3370ebfdd51b9aff707e50b754ca52796e49fbf
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
It also adds shebang and conforms the copyright header with the related
OPNFV template.
Change-Id: Iacb0cc8629e3021181eef2e8cb76daf48601abf4
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
It conforms with [1].
[1] https://gerrit.opnfv.org/gerrit/#/c/35211/
Change-Id: I11bbdcd63a1691835fb7c6198549edbaf6b758a1
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
It also adds the rst files to include this module in apidoc.
Change-Id: Iabbb17bc8601265bd9436c75d1afc0b470df1eb4
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
It also adds the related unit tests.
Change-Id: I8325bd9a55c69b229e3c48a9e64aa963e685e03d
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
It modifies pytest_suite_runner.py to dump unit test results in
functest.log via logging.
Change-Id: Ic4e7567c5e52e00ad0e485ccb070029b135041b2
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
logging.ini requires the full name otherwise all log messages are lost.
Calling basicConfig() is useless as it has been correctly configured by
run_tests.py before.
Change-Id: I03663c01f795b1b844239a9e24379faa529829aa
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
pytest_suite_runner can run any unittest.TestCase thanks to name passed
as run arg. Here is the related functest/ci/testcases.yaml:
run:
module: 'functest.core.pytest_suite_runner'
class: 'PyTestSuiteRunner'
args:
name: 'functest.tests.unit.odl.test_odl'
Change-Id: I7c2c611c4afbad1e52bfdca4a3288ccc21491389
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
So far, the test cases are storing a string "PASS" "FAIL"
in the self.result variable.
The way the new framework works is with INT Values.
Change-Id: I45e8693327740faadd8254b21569adfb2cefa6c8
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
|
|
|
|
Change-Id: I07c5a548f10a1779faead4d9c596a1976aff8866
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
JIRA: FUNCTEST-577
1. Replaced procedural openstack_utils with the object-oriented SNAPS
library
2. Tests now clean themselves up.
3. Improved code documentation.
4. Removed dependency on file-based Cirros image and now leveraging the
download URL.
5. Removed hardcoded location to the testcases.yaml file to leverage
the value in config_functest.yaml
6. Included optional flavor metadata based on the scenario being tested
7. Included support for multi-part images.
8. Added enhanced support for configurable images. see SNAPS-76
Fixed line length verification problem with the previous submission
Fixed retrieval of external network name to be dynamic.
Changed external network name retrieval to leverage the newly merged
snap_util.get_ext_net_name() function
Added the creation and deletion of flavors.
SNAPS now has the ability to add/remove security groups from running instances.
Changed VMInstance constructor by moving userdata to configuration object.
Change-Id: I0ef5e268eb153d696bb4d9a7533f780e5c603d26
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
|
|
|
|
run_tests.py now relies on PrettyTable as most of the openstack clients.
generate_report.py and its related unit tests are simply removed.
It sets padding_width=5 in testcase.py too to conform with
run_tests.py.
Now report is printed in every case.
Change-Id: Id9ce93f984503f25d6a2150482f397853fa3dd64
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
It also fixes pylint errors.
Change-Id: I0d973360574a517724d0be3986c788c3ce7f54d4
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
It adds PrettyTable as requirement even if it's already defined in
OpenStack client dependencies.
If the TestCase object is considered as invalid, it simply returns the
default str.
Change-Id: Iee788aef2a13694d9482560977cbbf21c7f2c967
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
|
|
* changes:
Remove the former results in DB url
Implement TestCase __str__()
|
|
|
|
Now ODL TestCase calculates the ratio between critical tests passed
and failed and saves it in result. Non-critical test cases can fail as
result doesn't take them into account [1].
It also updates default attribute values in TestCase and allows result
to be float.
[1] http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#setting-criticality
Change-Id: Id4a89271b5b1a90cd3c1e2b08591ff26ffaffee0
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
Change-Id: I514340fc6180e29b31ef11bdea9f719aa2bbb738
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
Change-Id: I0b8b9b2e85717fc92a233e4f7344b3419421778d
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
Testcases about snaps failed due to the absence of attribute 'logger'.
Change-Id: I78c85e51f63afa767fa73aa12faea066ad432371
Signed-off-by: Linda Wang <wangwulin@huawei.com>
|
|
It's designed to be called by run_tests.py when printing the results of
test cases and when generating the global report.
Change-Id: If4a6f023ef2344bbc4f940d07dde4b776dce5d68
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
|
|
|
|
Change-Id: I41cea33b4c1dae79e75231e7c7e069fc89736f34
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
TestCase offers a new public method to calculate and print the duration.
It also adds the related unit tests and adapts run_tests.py.
Change-Id: Ib6a7e637dafacb9027146199aeb033c2dcb986c6
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
Directories affected:
- ci
- core
and respective unit tests
Change-Id: I6a3d5aa68de29fc5a37ae543a067ff797eba33e6
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
|
|
It avoids erasing functest.log when project_name = functest.
Change-Id: Icae898abb8b51c89b79bb1124adfadab8b0b3b99
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
This mangling ensures that all info messages printed from core packages
are shown in console. It also avoids sphinx to print them.
Change-Id: I07db9f33060c195bce3b48b06a6640eb6c56c2eb
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
It deletes functest.utils.functest_logger and the related unit tests.
Then it modifies all functest modules to get all loggers via
logging.getLogger(). __name__ is mainly used as getLogger arg as
proposed by logging [1].
All loggers and handlers are now defined via functest/ci/logging.ini
instead of a dict loaded by an external json file.
Now only warn messages and info messages from ci and core packages are
printed in console.
[1] https://docs.python.org/2/library/logging.html
Change-Id: Ic192855e0f9bf94825d8f7ec73549a0f3b8d44c5
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
It converts all criteria values to the corresponding percent in
functest/ci/testcases.yaml.
Result is expected to be equal or greater than criteria. If both are 0,
result is considered as false.
It is compatible with the old behavior but warns to update.
It will allow a safer remove.
It also fixes a bug in test_tempest to allow merging [1] and
tier_handler.py which required that type criteria was str.
[1] https://gerrit.opnfv.org/gerrit/#/c/27949/
Change-Id: Ib6edcfa3103b7d51b0bdc83119f1cea2a8be9fbc
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
It mainly avoids mixing input and output.
Criteria is now an input set in functest/ci/testcases.yaml and then
must be passed as __init__() args (which will be proposed in an
additional change).
Then it also renames the related TestCase method to
check_result().
Change-Id: Ifc3c8e3ea6cde7e3edf7174bed4bf2bf0894e8e3
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
Change-Id: Iea64673788a3d5ab5eb3028522f659de183440ed
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
|
|
Support existing tenant and user with a get_or_create_tenant method.
If the tenant and user already exist it only get the id of those
JIRA: FUNCTEST-799
Change-Id: Id5daf2904592e42199471bdd3547e861e6db6e32
Signed-off-by: boucherv <valentin.boucher@orange.com>
|
|
It removes case_name from the list of attributes that run() must set
because it's now managed by run_tests.py (see __init__())
Change-Id: Id6228880257d0e9fb27483c56aa9985197feb04e
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
It also modifies the testcase module docstring.
Now features.py is rated 10/10 by pylint.
Change-Id: I83f2ac385b2a713d116c1ae4b49ba9cc9b26a83c
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
It's now useless as it's passed as run() args.
Change-Id: I97e14bd431a8844cd90905bf2050c48fb00f1cc5
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
It takes into account the following warnings/errors:
- Inline strong start-string without end-string
- Unexpected indentation
Change-Id: Idb05c7b04ba98ef8f3ef65e6ec7c9bb5b7571cad
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
Change-Id: I91a5c6fb14f7c76a348bb4329d023bab53a3804c
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
Change-Id: Idf0380930e97e1aa4584ba000f32d742a87d9486
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|
|
Change-Id: I75f51f216dcbf0db1c563cf381c28efc47241d3c
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
|
|
All features running bash programs are now simply defined in
testcases.yaml. All deprecated modules and unit tests are removed.
Change-Id: I7047b6f7a1e43cb8ed5ba2d569d5dcecae68fb86
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
|