aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/tests
AgeCommit message (Collapse)AuthorFilesLines
2023-09-29Upgrade pylint and fix latest warningsCédric Ollivier3-5/+8
Change-Id: I8b9e4b663a12ac9be18fded2d7b4e4b38428fa9f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2022-09-23Make robot driver even more genericCédric Ollivier1-7/+18
It allows setting any option via testcases.yaml Change-Id: I8cb5ead037a65f962c3ba1a14729b52195e95483 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2022-07-07Add deny_skipping parameterBellengé Maxime1-4/+21
It takes into account or not skip tests in the global result It also adds unit tests to cover it. It should be noted that if follows the deny skipping model proposed by Functest (tempest). Change-Id: I15fa7a3946c6e3b2ae190e4f8abf3b9361a391a4 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2022-03-03Allow overriding project_name via envCédric Ollivier1-0/+18
It now offers a new env var, PROJECT_NAME, to override the default value in testcases.yaml. Change-Id: I911f1af56afe88edb37de40176733b65bc8e490a Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-11-09Leverage latest pylint featuresCédric Ollivier6-37/+61
It adds encoding in all open call and leverage f-strings. Change-Id: I70ccd2bfcadae44929d5874f98fa3bf4ff644488 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-11-08Update robotframework to latest releaseCédric Ollivier1-13/+10
Change-Id: I298320f666e048d42047fd00de74df83142a5186 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-08-12Update pylint to 2.9.6Cédric Ollivier2-16/+22
It stops filtering upper constraints by versions as python 2 (and 3.5) dropped. Change-Id: Ieb96d068ebda813e020a093f3291b4a9526402e4 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-06-11Fix tag logics in behaveCédric Ollivier1-5/+7
The unit tests will be fully rewritten in a second change (out of this bugfix). Co-Authored-By: Ugur Caglar Kilic <ugur.caglar.kilic@oracle.com> Change-Id: I6413fbcecdf44dbfe9c978045f4b1d43ca0de2ec Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-06-08MTS inherits BashFeatureVincent Danno1-0/+35
Signed-off-by: Vincent Danno <vincent.danno@orange.com> Change-Id: Ifa3a5d5946c29863905490de5f875e17026744a5
2021-06-01Drop sixVincent Danno6-47/+41
python 2 was dropped [1] so we don't need six anymore [1]: https://gerrit.opnfv.org/gerrit/c/functest-xtesting/+/68262 Signed-off-by: Vincent Danno <vincent.danno@orange.com> Change-Id: I840211990b76f77a46e9e737fc4a4c857b57c0b2
2021-05-20Delete dead codeVincent Danno1-5/+0
The piece of code became unused following change https://gerrit.opnfv.org/gerrit/c/functest/+/39443 Signed-off-by: Vincent Danno <vincent.danno@orange.com> Change-Id: I0bf80790c05cef217be574ad196d8c4e8dfb4c2d
2021-05-10Use constants instead of hard-coding pathsVincent Danno2-11/+19
Signed-off-by: Vincent Danno <vincent.danno@orange.com> Change-Id: I9bef7db7584d6b615ef102d13797914095512733
2021-04-29Merge "Allow printing playbook output to console"Cedric Ollivier1-17/+67
2021-04-29Allow printing playbook output to consoleAjay Kumar1-17/+67
User can specify quiet: False in "testcases.yaml" if he wants to print the output on console. Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Signed-off-by: Ajay kumar <ajay4.kumar@orange.com> Change-Id: I30fa21bdcc2ed97757cd3c0b4720f9413466833f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-04-28Add console parameter to behaveframeworkFrancois Regis Menguy1-4/+9
Change-Id: I289de43bdea8c52181ec0622c83c5c56dd6890e3 Signed-off-by: Francois Regis Menguy <francoisregis.menguy@orange.com>
2021-04-27Add an Ansible driverAjay Kumar3-5/+156
It calls ansible_runner.interface.run() by converting the testcase description data to kwargs. It only overrides quiet and artifact_dir to implement the Xtesting behavior. Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: Ifd09810400babc0f2b81f2c33edf55a3ed88807b Signed-off-by: Ajay kumar <ajay4.kumar@orange.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-09-05Remove order in testcases.yamlCédric Ollivier2-11/+2
It's not used and asked for useless configuration data. Change-Id: Ie1713873aa880bed74bc3c9c4c08da5b30ea3bbb Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-01-04Fix behave driver and its related unit testsCédric Ollivier2-18/+19
Change-Id: I466d655162c1ddd5f4e3ef0e356a27007bfaea0f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-11-30Mock os.path.join in push_to_dbCédric Ollivier2-1/+3
Change-Id: I8d0c8f9ef4688454a6d2992ab1a20d871814e23f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-11-30Postprocess the TestAPI href returnedCédric Ollivier2-2/+4
[1] returned http://localhost:8082 [1] https://build.opnfv.org/ci/job/airship-opnfv-functest-healthcheck-latest-connection_check-run/58/console Change-Id: Ifc0e37a97442193a77762ecc2928b100e27028cd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-11-18Forbid multipart upload if google storageCédric Ollivier1-0/+6
Google Storage doesn't support S3 multipart uploads https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html https://cloud.google.com/storage/docs/composite-objects 5 * 1024 ** 5 is the multipart upload limit. https://docs.aws.amazon.com/AmazonS3/latest/dev/qfacts.html Change-Id: Iec3a5cd70ea6e912272ea231eecde6ee4f51ce4f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-11-16Add ContentType when publishing artifactsCédric Ollivier1-3/+37
The default value 'application/octet-stream' is mostly incorrect and forces downloading all links. https://build.opnfv.org/ci/job/functest-opnfv-functest-healthcheck-hunter-connection_check-run/436/console Change-Id: Ia680654f5e9f67154504264bc380f0a8d6a74d85 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-11-09Improve file scanning when publishing artifactsCédric Ollivier1-3/+12
Else it copies files from other testcases if the full suite is executed sequentially. Change-Id: Ic61472e47b655c34823a6fcb3ed3615e8f84a4c1 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-11-09Print Test API links in consoleCédric Ollivier1-0/+1
It adds TEST_DB_EXT_URL to print the right links in case of NAT or SSH port forwardings. Change-Id: If85b00de7325909facc903fba13a3fd59a1e705f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-11-09Generate Html and Xunit Behave reportsCédric Ollivier1-10/+25
Change-Id: I7d5f31502ba61b61a0b1c885fe8828211bc0bc0a Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-11-07Create Bucket if it doesn't existCédric Ollivier1-1/+34
Xtesting Ansible Role no longer creates bucket after starting Minio [1]. [1] https://github.com/collivier/ansible-role-xtesting/commit/8c62525bb0d0b5f8dcc2c4436711d5d075de8811 Change-Id: I1ad473ce55f9c00df8e558fdc67f571ee0a1875c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-11-02Publish artifacts to S3 repositoryCédric Ollivier1-0/+52
It simplifies Jenkins or Gitlab jobs by automatically publishing all artifacts via the framework. It leverages on Amazon Web Services (AWS) SDK [1] which supports the current cases (OPNFV, Xtesting Ansible role [2], etc.). [1] https://boto3.amazonaws.com/v1/documentation/api/latest/index.html?id=docs_gateway [2] https://github.com/collivier/ansible-role-xtesting Change-Id: I66e380c4da29fb0f973472a2c59ae0ea3c44fcfd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-07-26Switch to Python 3.7 and Alpine 3.10Cédric Ollivier3-4/+5
It also allows building docs as doc8 is broken due to latest OpenStack's upper-constraints. pylint is updated to 2.3.1 (lastest py3.7 version) It disables perm as umask is currently false on lf-virtual1. Change-Id: I8568eeafa44c5dba72e206c532c1f50e3ad547f2 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-07-11Adding first patch for behave featureDeepak Chandella2-7/+169
Change-Id: Ic975c301103b49cdec2bd26746b708388f21e892 Signed-off-by: Deepak Chandella <deepak.chandella@orange.com>
2019-06-14Remove energy modulesCédric Ollivier2-371/+0
The public recorder api has been down for a while. Change-Id: Ib879ef3b9ef56338c10cfcdeb733451c6f7573a6 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-05-12Fix unit tests (py36)Cédric Ollivier2-12/+12
It completes the patch "Update to Python3" [1] which was not fully verified in Functest Gates [2]. [1] https://gerrit.opnfv.org/gerrit/#/c/67782/ [2] https://travis-ci.org/collivier/functest-xtesting/jobs/531380395 Change-Id: Icd0d743e14ca1430828907cefba10b50489020a5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-05-07Update to Python3Cédric Ollivier1-3/+3
Now Xtesting containers use Python3 instead of python2. https://mail.python.org/pipermail/python-dev/2018-March/152348.html It also updates robotframework to latest release. Change-Id: I57e0d8b1af9aeaae0c445941a9bdf0b8bd346834 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-12-27Allow printing bash cmd output in consoleCédric Ollivier1-14/+97
It switches to Popen to print real-time console. Console has to be enabled per testcase (testcases.yaml). Change-Id: Id36b42c8409262f7c443e98ae2bcc465984b287f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-12-27Generate reports for unit testsCédric Ollivier1-50/+204
It now leverages on subunit to generate html and xml reports. Change-Id: I3f5a4fe5547e743b122b63e0b8530c9d9677cdbd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-12-01Set shell=True in subprocess.check_callCédric Ollivier1-15/+14
It allows running multiple shell instructions (see third). Change-Id: I132813c51d42f0fb4bc729d315c468d426f2fb3c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit f99cef18b6dd3eff6703c4d748fae415fea78ae2)
2018-08-29Stop verifying ResultWriter.write_results exit codesCédric Ollivier1-1/+1
ResultWriter.write_results() returns false if one test fails. It's skipped by run() because the report is correctly generated. [1] https://robot-framework.readthedocs.io/en/2.9.2/_modules/robot/reporting/resultwriter.html Change-Id: If29059b272679ed89a1189e0bb52997c83401b94 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-12Leverage on abc and stevedoreCédric Ollivier4-23/+61
Change-Id: I7b3c4c0c5dd0c9e6fb3e52c3fff5221d4b831b02 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-12Skip the selected testcase too0.56Cédric Ollivier2-2/+41
It completes "Allow calling a skip test" [1] [1] https://gerrit.opnfv.org/gerrit/60655 Change-Id: I02499aed56e6b23563165ea1f17b476e12408823 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-07Generate robot reportsCédric Ollivier1-4/+100
Change-Id: Ib9efe14bce6227f9609200c12ded4470bd0be969 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-07Allow calling a skip testCédric Ollivier1-2/+3
run_tests shouldn't return an incorrect value if the test is skipped. Else it simply forbids running tests in parallel (one test per thread). Change-Id: I07efca28dbf6cf1c29ec8e5c999e38cfe3ad0aad Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-15Allow dynamically skipping testcases0.52Cédric Ollivier1-2/+30
Change-Id: I7cf47f0625bdb8345fef43b24c51bd84ef4486ea Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-12Skip testcases by any env var0.51Cédric Ollivier3-65/+6
It also removes CI_LOOP which is releng centric. It can be passed as dependency if required. Change-Id: I146bb97950cb88062451158b7cc6a16c7f9d47a2 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-12Improve dependency managementCédric Ollivier1-2/+4
It avoids declaring dependencies if needed. Negative regex are correcty managed as well. Change-Id: I0e978823526246bc4a5192e63a8a893a4add0e2a Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-05-29Remove Feature logger0.42Panagiotis Karalis1-13/+0
This class atttribute is removed as it's quite useless (it forces one module per project). All messages are now printed to xtesting.log whatever the namespace and all warnings are printed in console. Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: I6860eaf427093ea21b3bd78650bec7939e947b2d Signed-off-by: Panagiotis Karalis <pkaralis@intracom-telecom.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-19Fix regex when INSTALLER_TYPE is unsetCédric Ollivier1-6/+10
Change-Id: I0ec012185f3c90b2a2c82b6f204ce332f3fa9c7f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-08Add tags support using include optionsmrichomme1-4/+5
Change-Id: Ibfd8645e2ec7da7d05ae806b5bc1f5a90bfc39a2 Signed-off-by: mrichomme <morgan.richomme@orange.com>
2018-02-28Switch from /home/opnfv/functest to /var/lib/xtestingCédric Ollivier2-1/+3
Functest containers will have to create symlinks to allow publishing artifacts. All classes create the mandatory dirs. Change-Id: Ia1f215005d553dd6d64685e4d8a3f5c843c5db7a Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-28Fully cover tier_builder.pyCédric Ollivier1-2/+13
Change-Id: I48ad1d430bb56b5be75b003800990a251f6a4065 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-28Remove all OpenStack operations in vnf.pyCédric Ollivier1-51/+2
Change-Id: I356305f3c59b51f97f5fb1335369834a77fda9b1 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-28Rename all Functest refs to XtestingCédric Ollivier17-0/+1930
It mainly renames python modules and then the related documentation config files. Change-Id: I186010bb88d3d39afe7b8fd1ebcef9c690cc1282 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>