• TestingDocs
TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Automation

SauceLabs Cloud Testing

Overview

SauceLabs is a cloud testing platform that enables us to test the web and mobile applications with devices on the cloud. Integration with SauceLabs allows us to perform continuous automated cloud testing, cross-browser testing, parallel testing on multiple devices, and live interactive manual testing. To know more about the platform please visit the official website: https://saucelabs.com/

 

Free Trial

Sauce Labs Trail Link

 

 

Sign-up for the service

 

Sauce Labs Signup

 

Running a Web Test

https://www.testingdocs.com/saucelabs-running-an-example-sample-test/

 

Running an Appium Mobile Test

package com.testingdocs.appium.quickstart.AppiumProject;

import java.net.MalformedURLException;
import java.net.URL;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.Assert;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import io.appium.java_client.android.AndroidDriver;

/**
 * Sample Sauce Labs Test.
 */
public class AppTest{
 public static final String USERNAME = "<your_username>";
 public static final String ACCESS_KEY = "<your_key>";
 public static final String URL = "https://"+USERNAME+":" + ACCESS_KEY + "@ondemand.us-west-1.saucelabs.com:443/wd/hub";
 public static AndroidDriver<?> mDriver;

 @BeforeTest
 public void setup( ) throws MalformedURLException {
 DesiredCapabilities caps = DesiredCapabilities.android();
 caps.setCapability("appiumVersion", "1.9.1");
 caps.setCapability("deviceName","Samsung Galaxy S9 Plus HD GoogleAPI Emulator");
 caps.setCapability("deviceOrientation", "portrait");
 caps.setCapability("browserName", "Chrome");
 caps.setCapability("platformVersion", "8.1");
 caps.setCapability("platformName","Android");
 mDriver = new AndroidDriver<>(new URL(URL), caps);
 }

 @Test
 public static void titleTest(){
 mDriver.get("https://www.testingdocs.com/");
 Assert.assertEquals(mDriver.getTitle(), "Home | TestingDocs", "Check Title");
 }

 @AfterTest
 public void tearDown( ){
 mDriver.quit();
 }
}

 

Configure the username and access key. Run the test.

View the result.

1 -> JSON API calls

 

Appium Test Sauce Labs

Related Posts

Emma Tool

Automation /

Code Coverage Tools

Selenium 4 Automation Project

Automation /

Selenium 4 Project Setup on Ubuntu Linux

Testing webpage mobile-friendliness using a tool

Automation /

Testing webpage mobile-friendliness using a tool

Errors Code Testing Development

Automation /

Error Severity Metrics

Automation /

Serverless Computing

‹ Calculator JUnit Tests in Maven Project› Mobile Testing Automation Tools

Recent Posts

  • How to secure your SQL Database: Tips and Tricks
  • Shaping the Future of Development: Exploring Key Trends in Software Engineering
  • Improving Java Performance with Multithreading
  • Difference between PHP and JavaScript?
  • Bing Conversation Styles
  • ChatGPT Introduction
  • Open Source AI Frameworks
  • Artificial Intelligence Tools
  • Top AI Music Applications
  • Top AI Website Design Tools

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com