Using TeamCity to test TeamCity
Answered
I have a pipeline defined in DSL. I have written unit tests for my code but would like to test the pipeline after it is created. I'd like to run a test that starts a build, checks its properties and that it finishes as expected. What is the best way to run tests on TeamCity builds?
Thanks,
Brian
Please sign in to leave a comment.
Hello Brian!
The easiest option that comes to mind is to start a build via REST API once it is created. You could then check the build parameters set programmatically as well as access build status. You could even run REST API call from another TeamCity build with VCS trigger pointing to the versioned settings repository - but it may be tricky to locate the build configurations that were changed, though (because versioned settings changes do not create an audit entry).
Please let me know if you would like any details on the above.
Hi Fedor, I'll give your suggestion a go.
Thanks for the help, Brian.