Run integration tests on version what was deployed recently

Hello.

We have a distributed system with several components what can be deployed independently and hosted in different repositories.
One project include integration tests.

I wanna achieve following flow:

  1. During the day any components of any version can be deployed
  2. Integration tests run every night
  3. Integration tests runs on the version of the project with tests what was deployed recently

Can i do it in any way ?

Thx.

0
5 comments

Hi Dmitry,

If multiple components in any version are deployed throughout a day, should the integration tests be run on all of them, or only on some?

0
Avatar
Permanently deleted user

Hi Denis,

We have tests only in one project, we build tests with project and we use appropriate tests .DLLs - we run tests every night, but we can deploy any version of this project and wanna to run tests on recently deployed version.

0

Hi Dmitry,

I think I'm understanding the situation now. Does your deployment happen through teamcity? Or you deploy manually? If it's done through teamcity, it might be easy. The build that performs the deploy can create a file with the version it deploys, then your integration tests configuration can simply take this file as an artifact dependency and read its value (or use a dependency parameter) to perform the tests against that version.

If I'm still missing something, please put me an example so I can have an easier time understanding what your issue is.

0
Avatar
Permanently deleted user

Hi Denis,

We deploy all through TC. We run integration tests every night using schedule trigger without any parameters. And because of it tests running with "default" branch.
But i wanna in someway run tests in branch/build what was deployed recently.

I try to use "snapshot" dependency chaining this configurations:
"build" - "deploy" - "run tests"
but "run tests" start in "default" branch and trigger "deploy" with "default" branch

We build "test" DLLs on "build" config, deploy "code" DLLs on "deploy" config and i wanna use on "run tests" config "test" DLLs from "build" config what correspond to "code" DLLs what was deployed.

For example we found a bug in code that already on prod and wanna test fix. We manually select branch/build and deploy code and wanna night tests use suitable DLLs.

And i don't want tests trigger build.

I hope this is more clear for you and you can understand our configurations =)

0

Hi Dmitry,

sorry for the delay, for some reason I thought I had already answered here, but it seems I didn't.

The usual approach for your scenario would be to break the snapshot dependency chain. Run tests wants to be run nightly, as far as I've understood. Putting it at the end of the chain will always trigger build and deploy, which is not what you want.

The approach would be to keep build and deploy as a chain, and generate the test DLLs as artifacts in the "build" configuration. Then, run tests simply has to pick up the artifacts from the "last successful build" of "build", because those are the last ones that should have been deployed. By picking those artifacts up, the test dlls can be used for testing the last version you deployed.

0

Please sign in to leave a comment.