Forum Discussion

Keith_S's avatar
Keith_S
New Contributor
2 months ago
Solved

AltTester 2.x with iOS on BitBar

Has anyone got builds with AltTester 2 working on BitBar? The problem is, at least for iOS, the IP address needs to be set for where AltDesktop/AltServer is running (in this case, on a machine for BitBar. Our run-test.sh script installs AltDesktop/Server when it runs on BitBar. So we need the IP address of that machine before we even build our Unity application.

If you have solved this problem, please share how.

Thank you!

  • Hello Kate.

     To integrate AltTester 2 with BitBar for iOS builds, dynamically retrieve the IP address of the machine running AltDesktop/AltServer in your run-test.sh script and pass it as a parameter to your Unity build process. Configure AltTester 2 within your Unity project to use this IP address for seamless integration.

2 Replies

  • Hello Kate.

     To integrate AltTester 2 with BitBar for iOS builds, dynamically retrieve the IP address of the machine running AltDesktop/AltServer in your run-test.sh script and pass it as a parameter to your Unity build process. Configure AltTester 2 within your Unity project to use this IP address for seamless integration.

    • Keith_S's avatar
      Keith_S
      New Contributor

      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:

      1. 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.

      2. 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/

      3. 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