Skip to end of metadata
Go to start of metadata

This topic describes how to configure Bamboo to work with Sauce for a Python-based project. It includes a set of demo tests you can use to test your configuration and see how Sauce interacts with Bamboo. 

Nose Testing Library

For illustration purposes, this topic assumes that you are using the Nose testing library, and that this library has already been installed in your testing environment. For more information about Nose, check out the official Nose docs site.

Create a Plan

  1. In Bamboo, click Create Plan
  2. Click Create New Plan
  3. For Project, select New Project
  4. For Project Name, enter Sauce Demo
  5. For Project Key, enter Sauce
  6. For Plan Name, enter Python
  7. For Plan Key, enter Demo
  8. Under Source Repositories, in the Source Repository menu, select Git
  9. For Repository URL, enter https://github.com/saucelabs-sample-test-frameworks/Python-Nose-Selenium.
  10. For Branch, enter master
  11. For Authentication Type, select None
  12. Select Use shallow clones.

Configure Tasks

  1. Click Configure Tasks
  2. Click Add Task
  3. Click Command.
  4. In the Command Configuration dialog, for Task Description, enter Run task
  5. Next to Executable, click Add Executable
  6. In the New Executable dialog, for Executable Label, enter nosetests.
  7. For Path, enter the path to your nose library.
  8. Click Save.
  9. In the Command Configuration dialog, for Argument, enter  --with-xunit simple_test.py.
  10. Click Save
  11. Click Create

    Don't Enable the Plan Yet!

     You'll need to enter the Sauce configuration after you configure the plan, so don't select  Enable this plan until after you've completed the plan configuration steps.

Configure the Plan

  1. Under Plan Configuration > Stages and Jobs > Default Stage, select Default Job
  2. Click Miscellaneous
  3. For Job Name, enter Default Job
  4. Select Job Enabled
  5. Click Save

Enable the Sauce Plugin

  1. Select Enable Sauce OnDemand
  2. In General Settings, select the Selenium Version you want to use for your tests. 
  3. Select the Browser you want to run your tests against. 
  4. Enter the Max DurationIdle Timeout, and Starting Browser URL settings for your test. 
  5. Click Save.

Sauce Connect Automatically Enabled

In the General Settings you will see that Enable Sauce Connect is selected by default, which will launch an instance of Sauce Connect prior to the running of your Job. This instance will close when the Job completes.

Run the Example Tests

  1. Go the Bamboo dashboard. 
  2. Click the Enable icon. 
  3. Click the Run icon. 
  4. After the tests complete, click Sauce Jobs
  5. Click the Job ID of any job to see the steps performed by the test as well as a test video.