SAUCE LABS: TOOL FOR BEHAVIOR DRIVEN DEVELOPMENT

ramazan apa
cloudnesil
Published in
3 min readJun 22, 2020

Nowadays, the importance of BDD tests increased more. The companies in the development phase; to write better code, to ensure that the developer does not think much about testing and to provide the connection between the developer and his / her client without reflecting the complex information about some business to the customer.

Many automated test platforms can be utilized when developing test automation. Browserstack, xamarin, and sauce labs are popular platforms for test tools. In this article, I will try to show how I use sauce labs, in my sample Bdd project.

First of all, there are different conditions for being a member of sauce labs. You can get a free trial account or get free with student support via Github. Available in different versions for use as full version.

After joining the Sauce labs, sauce labs gives us a unique username (sauceUser) and a secret key (sauceKey). These are very important because these unique keys are connecting between our project and the sauce labs tool.

You can access secret key from the user account on sauce labs

After doing all these operations, we can do sauce labs configuration on our Bdd project. This process is quite simple; we add our links to sauce labs in the config file of our project in our selenium webdriver settings.

As you can see, you can select the sauceRegion option. There are EN and US regions provide from the sauceLabs cloud.

No changes are needed when running BDD tests. I’m running npm run test script

You should see a log in the way I’ve underlined above to understand that the tests are working on sauce labs while working, further tests continue to work.

After the tests are finished, a log is created on sauce labs similar to the above.

We can watch our test live on this page.

Logging networks. You can see how many seconds the requests are made.

On the test, you can see the errors that can be made according to the second of every request made in the commands section.

Source Code : https://github.com/ramazanapa20/sample-bdd

Thank you…

Ramazan Apa,

Software Engineer At Cloudnesil

--

--