Skip to main content

Posts

Showing posts from December, 2017

Annotating Sauce Labs tests in Node JS

SauceLabs does not annotate jobs by default, showing the question marks instead of statuses, and the name of a job is always set to "Unnamed job". Luckily we have all the powers of Sauce Labs REST API in our hands and can both set the name of a job and its final status to something more meaningful. This example demonstrates how it can be done in Node JS. Every Sauce Labs job has a unique ID. We get this ID from the Webdriver object. saucelabs.js main.js

Reading a Gitlab pipeline variable in NodeJS synchronously

I'm assuming you already created your project on Gitlab and got your personal access token . This is a simple synchronous function that reads a Gitlab pipeline variable in NodeJS using Gitlab REST API v3. It uses sync-request that is not recommended to use in a production environment, although it can be successfully used in automated testing and various scripts.