Is it possible to log data to sauce labs while test is running?

Comments

3 comments

  • Avatar
    Phillip Ramirez

    Hi there!

     

    We display the OS and platform in the UI in both the top (near the test name) and in the metadata tab.

     

    You're also totally welcome to add any notes to the UI using the JavaScript executor command. An example would look something like this: 

    driver.execute_script('sauce:context=Place words here for notes')

     
    This will add an informational line in the UI which will display the text "Place words here for notes". You can also use it with a variable like:
     
    driver.execute_script('sauce:context=' + variable)
     
    These will appear in your "Commands" tab for you to review, effectively like comments.
     
     
    1
    Comment actions Permalink
  • Avatar
    Dharna Pahuja

    Hi,

     

    This was super useful. Thank you!

    I was actually looking to log data in the MetaData tab while the test is running. Would you be able to help me with that?

    0
    Comment actions Permalink
  • Avatar
    Phillip Ramirez

    Howdy!

     

    You'd be able to add custom information to the metadata tab by using our "Custom Data" capability: https://wiki.saucelabs.com/display/DOCS/Test+Configuration+Options#TestConfigurationOptions-CustomData

    Or if you'd like, you may also update it via the API: https://wiki.saucelabs.com/display/DOCS/Job+Methods#JobMethods-UpdateJob

     

    These should be eligible to be updated while your job is running and reviewed after completion. 

    0
    Comment actions Permalink

Please sign in to leave a comment.