Reputation: 435
Is there a way to configure parameters from the TeamCity UI, that can be accessed from .Net code during the NUnit test run?
Right now I know that it's possible to set an environmental variable in TC and then use it in the unit tests.
I would like to be able to quickly copy build configuration settings in teamcity, configure the tests differently and then run the build.
Thanks AD
Upvotes: 1
Views: 715
Reputation: 3099
I agree with @vikram, this is a good option. I will suggest another one. You may reference FluentTc library, which allows programmatic access to TeamCity parameters.
var buildId = new LocalTc().GetBuildParameter("build.id");
The package is available on nuget
Upvotes: 1
Reputation: 14
I think you need this.. may be..
Upvotes: 0