2

I m a bit confused about constructing an automated integration test environment that will run all my integration tests.

I have development, test (integration), preproduction (staging) and production servers and besides, have a server which is responsible for automated builds (Jenkins).

That is to say that i run my unit tests in jenkins server and deploy it to development server. i want to run my integration tests on my integration test server but i have only one CI hosted in one server.

Is this a correct architecture ?

Do i need a different Jenkins servers to run unit tests on development server and run integration tests on integration test server and so. Or how can i figure out running different kind of tests on single Jenkins server. ?

ccobanoglu
  • 192
  • 3
  • 13

1 Answers1

0

Integration tests require a separate environment.

  1. Create environment(all DBs and apps deployed)
  2. Seeding: set up minimum required data for the application to run. Eg if it is online sales, then products need to be present.
  3. Insert Scenario specific data (eg: new customer added)
  4. Simulate a scenario (eg: shopping basket with 3 items added)
  5. Execute final step (checkout+ payment)
  6. Verify (eg:ensure all checkout and payment went right. This could also involve custom queries direct to DB or other sources and also involve custom connectors like OLEDB which the application code may not be using)
  7. Delete environment: This is mainly for cost saving. All results and errors are logged and should be saved for review. Deletion of environment can be blocked for debugging purposes.

Steps 3-5 can be repeated to try multiple scenarios but it could also delete some tables in between to prevent other tests from contaminating the data. If some components cannot be recreated. Eg: API PUT to 3rd party API then that need to be dependency injected in this environment and mocked. But GETs from 3rd party should work as usual.

Custom coding might be needed for Step 2,3 and 6. Remaining should be re-used from code that is already built.

Blue Clouds
  • 7,295
  • 4
  • 71
  • 112