Conceptual question: integration tests with multiple executables

Hello,

I have a question that is probably more conceptual than technical.

We want to automatically do integration tests between services. For that we have at least one, possibly multiple services (all are a separate .exe on windows), which needs to be started first. Then we can execute the integration tests (we use postman / newman for that), and after that the services need to be stopped again.

How would I do that with teamcity, as I understand a build step can only execute some commands in a row, but not launch and stop a commandline .exe, and execute other stuff in between.

What would be the correct approach for this?

 

0
1 comment

Hi Sebastian,

There are several possibilities to achieve this.

First, you can write a custom plugin to do exactly whatever you need, and customize it to your liking. That way you can make it do exactly whatever you need.

This said, running command line or powershell scripts should be able to do it as well. The command line allows the "start" command to simply launch an application and instantly return, launching it as a "service". That way you can simply run it, run the tests as needed, and as a last step, kill the process. Usually, if it can be done in the command line, the same can be done via a command line build step.

If you face any specific issue with this approach, please specify

0

Please sign in to leave a comment.