getting the tfs BuildNumber when running the ReadyAPI command line on Octopus
I am needing to get the tfs BuildNumber to insert into a table within my TestCase setup (using a Groovy step). I am running the Testcase via the command line in my Octopus build. From reading the documentation on my build the tfs build number is a predefined variable of $(Build.BuildNumber). How do I get access to this variable from the build into my Groovy teststep in my testcase?
Hi tsmith0422,
If your build agent sets environment variables in the system as Jenkins does, you should be able to access those variables from a Groovy script within ReadyAPI the same way as it's described here: https://smartbear-cc.force.com/portal/KbArticleViewer?name=How-to-get-Jenkins-environment-variables-in-ReadyAPI-when-ReadyAPI-test-is-being-ran-with-Jenkins&sp=readyapi