Show "Pass/Fail" status on Sauce labs instead of "Finished" when using appium to automate iOS app

1,305 views
Skip to first unread message

Meenal Jain

unread,
Apr 4, 2014, 7:26:15 AM4/4/14
to appium-...@googlegroups.com
Hi All,

I'm using Appium to automate my iOS app. I've used TestNG to generate test report. when i'm running my tests on sauce irrespective of "As maven" or "As TestNG", Sauce showing status as "Finished" for my tests,but I want the status of my tests in form of "Pass/Fail".

Can anyone please help me on this?
This is my top priority task for now,so please respond ASAP.

Thanks,
Meenal

bootstrap online

unread,
Apr 4, 2014, 9:38:05 AM4/4/14
to Meenal Jain, appium-...@googlegroups.com
Use SauceOnDemandTestWatcher
https://github.com/appium/tutorial/blob/master/modules/source/java_ios/src/test/java/appium/training/ios/util/AppiumTest.java#L49
> --
> http://appium.io
> ---
> You received this message because you are subscribed to the Google Groups
> "Appium-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to appium-discus...@googlegroups.com.
> Visit this group at http://groups.google.com/group/appium-discuss.
> For more options, visit https://groups.google.com/d/optout.

Mike Redman

unread,
Apr 4, 2014, 4:57:42 PM4/4/14
to appium-...@googlegroups.com
Meenal,

      This can be accomplish by calling out to Sauce Labs API and updating the status of your test. I attached a couple of links that may help as well.
https://saucelabs.com/docs/rest#resources (look under the jobs section)

Michael

Meenal Jain

unread,
Apr 7, 2014, 3:13:52 AM4/7/14
to appium-...@googlegroups.com, Meenal Jain
Bootstraponline,I'm not able to open the link you provided. Its giving 404 error.

bootstrap online

unread,
Apr 7, 2014, 9:34:19 AM4/7/14
to Meenal Jain, appium-...@googlegroups.com
This is for JUnit.
https://github.com/saucelabs/sauce-java/blob/master/junit/src/main/java/com/saucelabs/junit/SauceOnDemandTestWatcher.java

The code for interacting with the rest API isn't JUnit specific though.

On Mon, Apr 7, 2014 at 3:13 AM, Meenal Jain <meena...@metacube.com> wrote:
> Bootstraponline,I'm not able to open the link you provided. Its giving 404
> error.
>

Meenal Jain

unread,
Apr 8, 2014, 7:46:37 AM4/8/14
to appium-...@googlegroups.com, Meenal Jain
Hi Bootstarp,
Thanks for the link you provided.

I've some queries regarding the link you provided:
1)Should i add this class as a new java class in eclipse to get it work?
2)What changes do i need to make?
3)Unable to access getPublicJobLink method used in this link. An error is showing up for this. Its showing sauceRest doesn't have this method.

I'm not getting How can i fullfill my requirement. Please help me out to resolve this issue ASAP.

Thanks,
Meenal

bootstrap online

unread,
Apr 8, 2014, 9:38:00 AM4/8/14
to Meenal Jain, appium-...@googlegroups.com
Sauce provides a REST API for updating job status. That link is an
example of using it for JUnit. I don't think there's a class prebuilt
for TestNG.

Example: https://github.com/saucelabs/saucerest-java/blob/master/src/ExampleUsage.java

Satyajit Malugu

unread,
Apr 8, 2014, 2:45:45 PM4/8/14
to Meenal Jain, appium-...@googlegroups.com
Jobs on sauce labs need to be updated 'after' a test has completed. You could either use their Rest API
https://saucelabs.com/docs/rest#resources
or https://github.com/saucelabs/saucerest-java

BTW you would get better responses if you don't demand people to help you. No one here has an obligation to you

Meenal Jain wrote:
This is my top priority task for now,so please respond *ASAP*.


Thanks,
Meenal

--
http://appium.io
---
You received this message because you are subscribed to the Google
Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to appium-discus...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages