You can see a video of this example being constructed from the link below.
Step 1 add a user variable to the Service test script called URL
Step 2 add a Custom Code step to the canvas
Step 3 rebuild the solution from the build menu
Step 4 add the code to the custom code activity
Step 5 Add an environment variable under the system environment variables with the same name as in the code ''URL_ENV''
Step 6 Use the value in the script by slecting test variable from the data source as I just did in my report message in the example video
[Get the video here]