Forum Discussion

van1's avatar
van1
Occasional Contributor
5 years ago
Solved

Need help to run automated test using Bitbar

Need to run the automated test with ruby and appium with cucumber framework getting some issues as Appium REST http interface listener started on 0.0.0.0:4723 2019-12-04 09:47:04:394 - [HTTP] --> ...
  • WilleK's avatar
    5 years ago

    Hello van1,

     

    Just as a note, to be able to better help you, in future posts please provide a direct link to any test run connected with the question. This way it is easier to debug and find the root of the problem.

     

    When you want to run automated tests on the Bitbar Cloud, you have two options,


    On the one hand there is Client Side, let’s call it the “standard way” of execution, where you start the test run from your own computer against a device in the cloud (1 to 1). To test more devices means more sessions.I would say this is a good starting point. With changing some capabilities, adding your API key, hub URL and uploading the app you will be starting your Appium test against the selected cloud device.

    Then on the other hand we have Cloud side, which is when you want to scale up your testing and start running fast parallel runs. Here you offload all the execution to the cloud, by uploading the test suite with all its components in a zip file. As well as the application. This is then executed in the cloud against as many devices as you would wish at the same time. This requires to create zip, with one additional file for our cloud to start the test run. Otherwise the tests / project are the same as locally just zipped in a neat package.

     

    Your zip package was missing this run-tests.sh file (also needs to be named just run-tests.sh), and therefore did not execute, this needs to be modified to start your test run in the way you would start it locally. I would recommend checking how our samples have the run-tests.sh configured.
    Also inside the run-tests.sh file, the application name defined is incorrect, it needs to be “application.apk” in this instance, as the cloud renames every application, so therefore the run-tests.sh should be looking for application.apk, even though the uploaded app has a different name.

    The Bitbar documentation contains a wealth of information about the test execution.
    https://docs.bitbar.com/testing/appium/


    Here is a link to our Ruby Sample, feel free to even use this as a base for your test.
    https://github.com/bitbar/test-samples/tree/master/samples/testing-frameworks/appium/client-side/ruby .

    PS If You would need to use higher version of ruby modify first line from run-tests.sh from '#!/bin/bash' to '#!/bin/bash -l' and add this command is next/second line 'rvm use ruby-2.5.0' then Your test will use ruby 2.5.0 under execution.

     

    If you have any more specific questions, please reach out!
    Kind Regards,
    Wille