RFR: 2218: Automate execution of integration tests

Erik Duveblad ehelin at openjdk.org
Wed Apr 3 09:08:53 UTC 2024


Hi all,

please review this patch that automates the execution of integration tests _if_ the required properties for the integration test are configured. Prior to this patch one would have to comment out the `@Disabled` notation and then make sure that all properties for all test methods where configured. It was also hard to see all properties required for a given test function to run. With this patch all properties are declared in an annotation and test functions whose properties are configured will be run automatically (no need to comment out any annotation).

I have also renamed these tests to end with the suffix `IntegrationTests.java`. For unit tests we use the suffix `Tests.java` and for tests that require properties to be configured we should use the suffix `IntegrationTests.javaa` (since that is what those tests are).

I also choose a different name for the file containing the properties required for a test to run, the file is now named `test.properties` instead of `manual-test-settings.properties`. The new name is quite a bit shorter and the tests are also no longer manual, they are run automatically as long the required properties for a given test are present.

I also added support for including test properties from another file to allow test properties to be shared among multiple developers. Included files must be specified with an absolute path since it is hard to figure out the current working directory that tests are being run from (it also make the configuration more explicit).

Lastly I have slightly refactored the integration tests so that they all follow a similar pattern. There quite a bit more work that needs to be done here: test properties use different naming schemes (camel case vs dot), not all test properties are prefix with the test suite name (could result in name clashes) and some of the test code could use some tender, love and care. This can be taken care of the later, this patch is already quite big.

Thanks,
Erik

### Testing
- [x] Verified that tests are *not* run when properties are missing
- [x] Verified that tests *are* run when properties are present
- [x] Verified that tests are *not* run when no `test.properties` file is present
- [x] Verified that all JIRA integration tests still pass

-------------

Commit messages:
 - skara-2218

Changes: https://git.openjdk.org/skara/pull/1627/files
  Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1627&range=00
  Issue: https://bugs.openjdk.org/browse/SKARA-2218
  Stats: 2280 lines in 12 files changed: 1230 ins; 1049 del; 1 mod
  Patch: https://git.openjdk.org/skara/pull/1627.diff
  Fetch: git fetch https://git.openjdk.org/skara.git pull/1627/head:pull/1627

PR: https://git.openjdk.org/skara/pull/1627


More information about the skara-dev mailing list