Uploaded image for project: 'Talend Data Prep'
  1. Talend Data Prep
  2. TDP-5393

Unit tests for dataprep-*test-api are not run on 'mvn test'

Apply templateInsert Lucidchart Diagram


    • Work Item
    • Status: closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.6.0 (Spring '18)
    • Backend


      When a developer do a mvn clean install on data-prep or data-prep-ee, no integration test is run. This is fine BUT this behaviour prevents the unit tests of dataprep-tes-api and dataprep-ee-test-api from being run !
      Moreover, when the integration tests are executed, unit tests are too. No matter the nature of the test (integration or unit), in case of failure, the build is considered successful. This behaviour is not acceptable for unit tests as it may lead to erroneous commits pushed to master.

      The expected behaviour should rather be:

      • when a developer do a mvn clean install, then it runs all the unit tests of all targeted projects and no integration test.
      • if a failure occurs during unit tests execution, then the build must fail.
      • and a maven command with a dedicated profile / property needs to be executed in order to run integration tests.

      Chosen solution
      For TDP 2.6 and later :

      • the usage of a profile is useless (but we can keep it in CI jobs, for backward compatibility)
      • the maven failsafe plugin is now used to run integration tests instead of the surefire plugin (more suitable for unit tests and still used to run them)
      • the maven phase `verify` is used instead of `test` (this maven phase will remain executed)
      • the maven failsafe buit-in property `skipITs` is the one used to run integration tests (do a `-DskipITs=false` to run them)




            Unassigned Unassigned
            elogeart Emeline Logeart
            0 Vote for this issue
            2 Start watching this issue