Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

Saucelabs badge #98

Closed
alessioalex opened this issue Nov 24, 2014 · 11 comments
Closed

Saucelabs badge #98

alessioalex opened this issue Nov 24, 2014 · 11 comments

Comments

@alessioalex
Copy link

Hey,

Is there any way I can get a badge for my project? I saw that I need to setup a build id or something (I searched through the saucelabs website) ..? However I didn't find anything on the zuul wiki.

Can somebody help me out?

Thanks

@defunctzombie
Copy link
Owner

I think saucelabs has badges but I am not sure where on their site they are :(

@cledev
Copy link

cledev commented Dec 10, 2014

Hi @alessioalex . I just figured this out today. You can get the badges at https://docs.saucelabs.com/reference/status-images/ . But they will say "unknown" unless you run zuul through travis-ci. Travis provides that build id and whatnot.

@jessetane
Copy link

FYI you can set the environment variable yourself to work around this:

TRAVIS_BUILD_NUMBER=$RANDOM zuul -- test.js

Relevant source:

build: process.env.TRAVIS_BUILD_NUMBER,

Might be nice to fall back to something like process.env.BUILD_NUMBER for this / other non-travis use cases?

@dzcpy
Copy link

dzcpy commented Jun 12, 2016

After tried many time, I have found the reason why saucelabs always shows an unknown barge even though all my tests has passed. Here is the reason from saucelabs' documentation:

All you have to do is add either markdown or HTML code to your GitHub README or project site that references your Sauce Labs username and access key, and annotate your tests with the REST or WebDriver API.

What we need here is to use saucelabs api to update the job with an 'passed' field to indicate whether the test has passed on client site and it must be updated explicitly during a separate API call.
And here is how karma-runner module did it:

See also: #288

@vvo
Copy link
Collaborator

vvo commented Jun 13, 2016

@andyhu I have matrix badges working here: https://github.com/algolia/algoliasearch-helper-js with zuul, not sure what you mean?

@dzcpy
Copy link

dzcpy commented Jun 13, 2016

Hi @vvo,
Thanks for replying. Here is my config file for zuul. I passed all tests on saucelabs but the badge is still unknown (I've managed to update those jobs through a script though).

@dzcpy
Copy link

dzcpy commented Jun 13, 2016

And did you test it on travis-ci? Travis CI has an addon sauce_connect which seems automatically update the saucelabs job annotation after test, however if we are on a development server, it doesn't work. For my transliteration module I showed you above I even used travis-ci but not add sauce_connect addon, so it might be the reason why it doesn't update the job info. However if you check karma-saucelabs-luncher you can see even if you are not using travis-ci saucelabs' job annotation can be still correctly updated.
For more detailed description about the issue please check here:
#288

@vvo
Copy link
Collaborator

vvo commented Jun 13, 2016

Yes we are using travis-ci. For faux-jax I still dunno why the badge is not showing, Ill reload tests.

Here's the travis yml for helper: https://github.com/algolia/algoliasearch-helper-js/blob/master/.travis.yml

@dzcpy
Copy link

dzcpy commented Jun 13, 2016

Thanks for investigating this issue. I'm not sure why in your project it is working fine, but as per saucelabs documentation, for each tests the test launcher must call their api to update the jobs info. However I haven't seen in zuul's source code, there is such functionality

@niftylettuce
Copy link

@vvo did you ever figure out why it was cached/unknown? I have same issue and it seems like everyone else does - Sauce doesn't tell us why either, even on their official support thread thing... 🤦

@vvo
Copy link
Collaborator

vvo commented Oct 25, 2016

Nope sorry.. good luck!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants