[Feature ask][Azure] CI-CD pipeline should allow services to run Integration tests from multiple folders
Each service has an entry named
gitlab-ci.yaml which indicates the location of pom.xml for test modules of that service for any given CSP.
This model works well when all the integration tests are located in one folder only. Till date, that is indeed the case. There are two types of Integration test frameworks being used in OSDU services as of now-
- JUNIT- Most of the ITs are located in
<service>-test-core. CSPs can override existing tests/ add new tests in
<CSP>folder. The tests are nothing but methods in test classes which can be overridden in child classes.
- Cucumber- For R3 services, cucumber seems to be the preferred method. Here there's just one test folder-
<service>-test-core and all the tests are located there. Examples are WKS, schema etc. Cucumber tests DO NOT OFFER overriding mechanism however and it causes problems while writing CSP specific tests.
Shortcomings in current behaviour
Since the pipeline allows only one test directory as a parameter, it mandates that all the integration tests should be written under one folder only. However, for cucumber framework, it does not cater to the need of having two folders from where tests need to run. For example,
<service>-test-core might have tests for all the APIs in
<service>-test-azure might have all the tests for azure specific APIs. Now we need to run tests from both these folders.
In schema service, we are introducing an azure only API for handling system schema. Similar azure only APIs exist in workflow service. MR osdu/platform/system/schema-service!112 (diffs)
AZURE_TEST_SUBDIR should accept a list of directories instead of just one directory. The list should be handled accordingly in ci-cd scripts and tests should be run for each directory in the list.