Experitest custom endpoint


#1

I try to execute my tests using the https://experitest.com/ platform. According to this I use a “Custom endpoint”: Adding remote endpoints in Ranorex Webtestit

My endpoint configuration looks like that:

URL: https://cloud.seetest.io/wd/hub

Capabilities:

{
“browserName”: “googlechrome”,
“browserVersion”: “79.0.3945.130”,
“platformName”: “Windows 10”,
“accessKey”: “XXX”,
“testName”: “WebTestit POC”
}

The actual accessKey value is a 198 character string.

I took the capabilities according to this documentation:
https://docs.experitest.com/display/TE/Tutorial+-+Run+your+first+automated+test

The generated Java/TestNG code generated from the experitest code generator is:

import org.openqa.selenium.*;
import org.openqa.selenium.remote.BrowserType;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

import java.net.URL;


public class exampleScript {

    private static final String ACCESS_KEY = "XXX";// actual key is 198 chars long
    private RemoteWebDriver driver;
    private URL url;
    private DesiredCapabilities dc = new DesiredCapabilities();

    @BeforeMethod
    public void setUp() throws Exception {

        url = new URL("https://cloud.seetest.io/wd/hub");
        dc.setCapability(CapabilityType.BROWSER_NAME, BrowserType.CHROME);
        dc.setCapability(CapabilityType.BROWSER_VERSION, "79.0.3945.130");
        dc.setCapability(CapabilityType.PLATFORM, "Windows 10");
        dc.setCapability("accessKey", ACCESS_KEY);
        dc.setCapability("testName", "Quick Start Chrome Browser Demo");
        driver = new RemoteWebDriver(url, dc);
    }


    @Test
    public void browserTestGoogleSearch() {
        driver.get("https://www.google.com");
        new WebDriverWait(driver, 10).until(ExpectedConditions.presenceOfElementLocated(By.name("q")));
        WebElement searchBar = driver.findElement(By.name("q"));
        searchBar.click();
        searchBar.sendKeys("Experitest");
        searchBar.sendKeys(Keys.ENTER);
    }

    @AfterMethod
    public void tearDown() {
        System.out.println("Report URL: "+ driver.getCapabilities().getCapability("reportUrl"));
        driver.quit();
    }

}

I fiddlet out the capabilities from the setUp() method code and put it in the Webtestit custom endpoint.
Executing a test with that endpoint runs in the ubiquitous maven-surefire-plugin error.

Could you provide a working demo example for experitest platform?

After running in the issue described above my POM file was corrupt and the whole Webtestit application crashed. Re-opening the project was impossible. I had to discard my changes from source control to bring my project back to live.


#2

Hello @HAR!
Honestly, I haven’t heard about this service that you are using, but it seems like a very useful one, similar to SauceLabs and BrowserStack.
After struggling to create an account there (they somehow were rejecting my business email as temp mail :space_invader: )
I also saw the documentation that you mentioned, but mostly I was amazed by the accessKey character count :smiley:

To use this service via our Custom Endpoint feature, you provided all the necessary capabilities, however, it seems like the issue lies in the “platformName” capability that in your case is “WIndows10”.
To make things run, use the "platformName": "WIN10" instead.

Here is the custom endpoint setup for our java-demoshop project that worked for me:

URL: https://cloud.seetest.io/wd/hub/

{
  "browserName": "chrome",
  "platformName": "WIN10",
  "browserVersion": "79.0.3945.130",
  "accessKey": "198 chars long key",
  "testName": "Demo"
}

Take a look at the video below:

If you are interested, here is a how-to article for integrating with BrowserStack


#3

EDIT: I have had a few failed attempts with this, but I couldn’t reproduce the “POM file was corrupt and the whole Webtestit application crashed” issue :confused:
I cannot tell you exactly what could be the problem with this, maybe the Language Server stopped and caused trouble, not sure, but I will poke around a bit and see if I can reproduce the issue.


#4

Hi @smatijas,
thanks for the quick help. I currently compare Sauce Labs, Browserstack and Experitest to evaluate the most suitable platform for my requirements. After changing platformName and browserName in my endpoint according to your example it works like a charm :grinning:


closed #5