X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=README_tst010_robot_cicd.md;fp=README_tst010_robot_cicd.md;h=ff07e5d7cd0b788de5eda5879385a7ac8b5c2fca;hb=e570b10455cf0ca49f1597e91282ce75c06688ea;hp=0000000000000000000000000000000000000000;hpb=9fc2b84c815dbadf688a28b9ae0ca710ca71a9cd;p=osm%2Ftests.git diff --git a/README_tst010_robot_cicd.md b/README_tst010_robot_cicd.md new file mode 100644 index 0000000..ff07e5d --- /dev/null +++ b/README_tst010_robot_cicd.md @@ -0,0 +1,50 @@ + + +# Guide to SOL005 integration into OSM's existing CI/CD pipeline +## Add tests to test selection files +### Locate the correct test selection file + +The test selection files are located in `/conformance-tests/test-lists/`. Each API has its own test selection file of the same name (i.e. NSDManagement-API.txt for NSDManagement-API). + +### Test selection files +Each test selection file has the following format +```git l +-t [Test name] +--variable [varName:value] +``` +For example +``` +-t PATCH NSD Content - Method not implemented +-t DELETE NSD Content - Method not implemented +--variable nsdInfoId:$NSD_INFO_ID +--variable nsdInfoIdPlain:$NSD_INFO_ID +``` +For values which need to be created dynamically (like resource IDs), use environment variables (see below). +## Add resource management code +### Resource creation +The test management code resides in `/conformance-tests/run_conformance_tests.py`. +Using the osm client, create the relevant resources and assign the required values to environment variables (using the `os.environ` dictionary). + +### Env variable subbing +The code then replaces the environment variables referred to in the test selection files using the `envsubst` unix command). + +### Resource clearing +Don't forget to clear all created resources at the end of the testing! + +## Reports +The reports are located in `/conformance-tests/reports/{API_NAME}/*`. \ No newline at end of file