So I have this application made with Xamarin which is actually a client for a backend application. During UI tests I need to provide the backend URL to the application that is installed in the Android/iOS device to make it works.
Fortunately the URL is deterministic so I can make -for example- a script step that would calculate it for me.
My question is: how do I set this information in the code?
Currently the application is using a hardcoded string constant that has this URL. I thought about using environment variable and a static property but that means it will get the value at execution time and I don’t think that’s what I want. What I think I need is to be able to build the application using the URL I will calculate somewhere in the workflow.
Is it the correct approach? How can I achieve this?