We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More

Forum Discussion

abhipatel1592's avatar
abhipatel1592
Occasional Visitor
6 years ago
Solved

How to run appium-java automated tests as a server side execution in BitBar

Hi I am new to Bitbar, I have gone through multiple documentation but still, I am unable to figure out how to run my appium-java automated tests on bitbar cloud as a part of server-side execution?

 

Things I want to know:

1. what goes inside the run-test.sh file (FOR JAVA-APPIUM), can you please provide a detail explanation of it?

2. How and what is needed in a zip file? Do I need to zip every file and upload or can I zip directory containing test files and upload?

3. Anything which I should know as the best practice to run automated tests on Bitbar.

 

Thank you.

  • Hello abhipatel1592 ,

     

    Ad. 1

    run-tests.sh is an entry point for server-side tests executor. It's using Docker as a sandbox, so your files are safe and the test environment is always fresh. So with this shell script, you can do all the additional preparations that you need.

     

    Ad. 2

    Your test ZIP archive should contain all files needed to run your tests. The only requirement is that run-tests.sh script must be placed at the root. Maybe this article will help you:

    https://support.smartbear.com/bitbar/docs/testing-with-bitbar/automated-testing/appium/running-cloud-side-appium-tests.html

     

    Ad. 3

    Again - the above URL should answer the question. I can add that good practice is that run-tests.sh script should create screenshots directory before starting test. BitBar Cloud will show screenshots from this directory in results. Also if you are using Java then probably you will be using JUnit as a reporter. If you will create tests report as file TEST-all.xml, then BitBar Cloud will read and present test methods in the UI results page.

     

    Here is our Appium Server Side sample using Java:

    https://github.com/bitbar/test-samples/tree/master/samples/testing-frameworks/appium/server-side/image-recognition

     

    Br,

    Marek

1 Reply

  • Hello abhipatel1592 ,

     

    Ad. 1

    run-tests.sh is an entry point for server-side tests executor. It's using Docker as a sandbox, so your files are safe and the test environment is always fresh. So with this shell script, you can do all the additional preparations that you need.

     

    Ad. 2

    Your test ZIP archive should contain all files needed to run your tests. The only requirement is that run-tests.sh script must be placed at the root. Maybe this article will help you:

    https://support.smartbear.com/bitbar/docs/testing-with-bitbar/automated-testing/appium/running-cloud-side-appium-tests.html

     

    Ad. 3

    Again - the above URL should answer the question. I can add that good practice is that run-tests.sh script should create screenshots directory before starting test. BitBar Cloud will show screenshots from this directory in results. Also if you are using Java then probably you will be using JUnit as a reporter. If you will create tests report as file TEST-all.xml, then BitBar Cloud will read and present test methods in the UI results page.

     

    Here is our Appium Server Side sample using Java:

    https://github.com/bitbar/test-samples/tree/master/samples/testing-frameworks/appium/server-side/image-recognition

     

    Br,

    Marek