Thanks Emily! I appreciate the reply and that idea. I wanted to give a follow up here as well, as I've been researching this for the last few days, spoke with BitBar customer support, and read several articles. Below are my findings, as I hope if will help other folks in the future.
So there are 2 solutions I found for this, and Emily's adds a 3rd as well. Or company's build and test pipeline starts our Unity app build long before a test session with BitBar is created. Altering that would require quite a bit of changes and isn't currently realistic (another team controls our build pipelines). Our pipeline (simplified), if folks are curious, is: create unity app builds > upload builds to an archive > upload Apple/Google/Amazon if needed > upload to BitBar and fire off tests.
Note: I confirmed, as did BitBar support, that the IP of the machine running the tests can change every test session. To support AltTester 2.x in iOS, you need the IP address of AltDesktop/AltServer at build time for Unity apps. So, how can we address this.
Solutions:
- As per Emily's post, you could start a test session with BitBar and retrieve the IP address of the machine via your test script (i.e., use "ifcong" and parse it out). Use that to dynamically set it in your Unity pre-build scripts for your app. Then, build and upload your app to BitBar and fire off your tests.
- As per the article from AltTester below, set up a VM you control, with a static IP, and host AltDesktop/AltServer there. Now you have a know, static IP that you can always use for all test runs.
https://alttester.com/run-c-tests-with-appium-and-alttester-in-bitbar-server-side/
- Configure your application to accept the IP address as a launch argument. Then, during your testing, get the IP address from the BitBar server (via your run-test.sh script), and pass that to your application as a launch argument. Your app would need to then find and set the host field in the AltTester popup at runtime/startup.
For me, option 3 would be easiest. However, our company has many different teams with many different Unity apps, and it's not as easy for all of those teams to to. So we're planning on going with option 2 and setting up a VM (or several) to host AltServer.
I hope this post will help others in the future.
-Keith