Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. SSH into the Integ Test Machine as per above.

  2. Edit bridge-sdk.properties, bridge-sdk-test.properties, and BridgeWorker-test.conf. For Worker Integ Tests, you’ll need to update all 3 files. For Server Integ Tests, you only need to update the first 2.

    • The simplest way is to use vi.

    • In bridge-sdk.properties, at the top of the file is the env property. Set this to develop or staging or production accordingly.

    • In BridgeWorker-test.conf, at the top of the file is the bridge.env property. Set this to dev or uat accordingly. (Note, Worker Integ Tests don’t run Note, this is different from bridge-sdk.properties. Both are needed for Worker Integ Tests.)

    • Note: bridge-sdk-test.properties doesn’t have an env property.

    • Also, uncomment the properties for env you want to test. Comment out the properties for the envs you aren’t testing.

  3. cd into the directory of the test you want to run (git/BridgeIntegrationTests or git/BridgeWorkerIntegrationTests).

  4. git pull to update the integ tests. git log --oneline to verify that the changes you pulled are the ones you expected.

  5. Run mvn -U clean test -e &> ~/log/server-dev-yyyy-mm-dd-hhmm.log &.

    • IMPORTANT: If running production tests, run this instead: mvn -U clean test -DjunitCategory=integrationSmokeTests -e &> ~/log/server-devprod-yyyy-mm-dd-hhmm.log &. Some tests cannot be run in production, and this ensures that only our smoke tests are run. (Worker Integ Tests do not run at all in Production.)

      • Note: UploadTest testRedriveUploadSmallBatch() and testRedriveUploadLargeBatch() don’t succeed in Prod. This never succeeded in Prod, because it uses Superadmin API, and we don’t have Superadmin credentials in our Integ Test Machine. We should change this to not run in Prod.

    • The -U makes sure we update all packages in our Maven package cache. Running without this flag has led to weird dependency issues in the past.

    • clean ensures we have a clean workspace before running tests.

    • -e also produces error messages.

    • &> sends both stdout and stderr to the specified file.

    • Name the log file according to your stack (server or worker), env (dev, uat, or prod), and set the timestamp accordingly. This is to disambiguate between test runs.

    • & runs Maven in a separate process, so that if the SSH session dies, Maven still continues to run our integ tests.

Server tests take about 37 min in Dev and Staging, 8 min for Prod. Worker tests take about 15 minutes.