{"id":273,"date":"2022-06-08T18:06:53","date_gmt":"2022-06-08T18:06:53","guid":{"rendered":"\/blog\/?p=273"},"modified":"2025-06-23T20:09:15","modified_gmt":"2025-06-23T20:09:15","slug":"introducing-evinced-support-for-lambdatest","status":"publish","type":"post","link":"https:\/\/www.evinced.com\/blog\/introducing-evinced-support-for-lambdatest\/","title":{"rendered":"Introducing Evinced support for LambdaTest"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Anyone doing functional tests is interested in getting as much value as possible from them. One way to really up your game is to add accessibility testing as well.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Effective today, we\u2019ve made that even easier. We\u2019re announcing native support for LambdaTest inside our Selenium SDK products.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you don\u2019t know, LambdaTest is a hugely successful cross-browser testing platform known for fast, reliable test execution and orchestration. Their Selenium grid allows for automated testing across 3,000 browsers and operating systems.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How this helps<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you have used other accessibility integrations with Selenium, you know that you have to add an accessibility scan after every significant interaction on the page. So an end-to-end test might require 10 separate scans\u2026and dozens of separate reports that somebody has to manage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But Evinced\u2019s auto-testing SDK, and its Selenium integration, changes all that. With us, you don\u2019t need to alter individual test code, and you get one consolidated, helpful report (complete with fix recommendations) at the end. Plus our computer vision approach allows us to find critical accessibility bugs that used to require manual testing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setting up a test<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">So with our LambdaTest support, you can get all this AND run your tests across their impressive Selenium grid, quickly and intelligently. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s take a look at how easy it is to do.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, let\u2019s take a look at our LambdaTest example test:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><button class=\"copy-code-button\" type=\"button\" aria-label=\"Copy code to clipboard\" aria-live=\"polite\">Copy<\/button><code>\/\/imports...\n\npublic class LamdaTest {\n    private String testName;\n    public static final String demoPage = \"https:\/\/demo.evinced.com\/\";\n    private RemoteWebDriver webDriver;\n    private String Status = \"failed\";\n\n    @BeforeMethod\n    public void setup(Method m, ITestContext ctx) throws MalformedURLException {\n      String username = System.getenv(\"LT_USERNAME\");\n      String authkey = System.getenv(\"LT_ACCESS_KEY\");\n      String hub = \"@hub.lambdatest.com\/wd\/hub\";\n\n      DesiredCapabilities caps = new DesiredCapabilities();\n      caps.setCapability(\"platform\", \"Windows 10\");\n      caps.setCapability(\"browserName\", \"Chrome\");\n      caps.setCapability(\"version\", \"92.0\");\n      caps.setCapability(\"resolution\", \"1024x768\");\n      caps.setCapability(\"build\", \"TestNG With Java\");\n      caps.setCapability(\"name\", m.getName() + this.getClass().getName());\n      caps.setCapability(\"plugin\", \"git-testng\");\n      String&#91;] Tags = new String&#91;] { \"Feature\", \"Magicleap\", \"Severe\" };\n      caps.setCapability(\"tags\", Tags);\n      webDriver = new RemoteWebDriver(new URL(\"https:\/\/\" + username + \":\" + authkey + hub), caps);\n    }\n    \n    @After\n    public void tearDown() {\n        webDriver.quit();\n    }\n    \n    @Test\n    public void evincedTrvlTest() {\n        webDriver.get(demoPage);\n        \/\/ Click \"Your New Home\" dropdown\n        driver.findElement(By.cssSelector(\"div.filter-container &gt; div:nth-child(1) &gt; div &gt; div.dropdown.line\")).click();\n        \/\/ Click \"Where\" dropdown\n        webDriver.findElement(By.cssSelector(\"div.filter-container &gt; div:nth-child(2) &gt; div &gt; div.dropdown.line\")).click();\n        \/\/ Click \"When\" date picker\n        webDriver.findElement(By.cssSelector(\".react-date-picker\")).click();\n        \/\/ Click on the \"Search\" Button\n        webDriver.findElement(By.className(\"search-btn\")).click();\n        \/\/ Assert we have navigated to the results page\n        Assert.assertEquals(\"Page two | Evinced, Demos site\", driver.getTitle());\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Take a look at the @Before method above. This is where we will want to initiate the EvincedWebDriver class by passing in the RemoteWebDriver instance webDriver that has created a Selenium session on the LambdaTest cloud. (Check out the <a href=\"https:\/\/www.lambdatest.com\/capabilities-generator\/\">LambdaTest capabilities generator<\/a> for all the information needed to select a testing environment.)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We can then start the Evinced engine using the evStart() method in line 24 below. It\u2019s worth emphasizing that once this is called, <strong>the engine will continuously run in the background, tracking all DOM changes as the tests execute, and collecting accessibility violations along the way.<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><button class=\"copy-code-button\" type=\"button\" aria-label=\"Copy code to clipboard\" aria-live=\"polite\">Copy<\/button><code>private EvincedWebDriver driver;\n\n  @BeforeMethod\n  public void setup(Method m, ITestContext ctx) throws MalformedURLException {\n  \n      String username = System.getenv(\"LT_USERNAME\");\n      String authkey = System.getenv(\"LT_ACCESS_KEY\");\n      String hub = \"@hub.lambdatest.com\/wd\/hub\";\n  \n      DesiredCapabilities caps = new DesiredCapabilities();\n      caps.setCapability(\"platform\", \"Windows 10\");\n      caps.setCapability(\"browserName\", \"Chrome\");\n      caps.setCapability(\"version\", \"92.0\");\n      caps.setCapability(\"resolution\", \"1024x768\");\n      caps.setCapability(\"build\", \"TestNG With Java\");\n      caps.setCapability(\"name\", m.getName() + this.getClass().getName());\n      caps.setCapability(\"plugin\", \"git-testng\");\n      String&#91;] Tags = new String&#91;] { \"Feature\", \"Magicleap\", \"Severe\" };\n      caps.setCapability(\"tags\", Tags);\n  \n      webDriver = new RemoteWebDriver(new URL(\"https:\/\/\" + username + \":\" + authkey + hub), caps);\n      driver = new EvincedWebDriver(webDriver);\n      driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n      driver.evStart();\n  }<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Last, we need to tell the engine when to stop and generate the accessibility reports. We can do that in the @After method. A Report object is created when we stop the Evinced engine using the evStop() method. Once the engine is stopped, we\u2019ll then be able to export the accessibility report as a JSON or HTML report (or both!).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><button class=\"copy-code-button\" type=\"button\" aria-label=\"Copy code to clipboard\" aria-live=\"polite\">Copy<\/button><code>@After\npublic void tearDown() {\n    \/\/ Stop the Evinced engine and generate the report object\n    Report report = driver.evStop();\n    \/\/ Export the report - JSON\n    EvincedReporter.writeEvResultsToFile(\"Evinced-LambdaTest-A11y-JSONReport\", report, EvincedReporter.FileFormat.JSON);\n    \/\/ Export the report - HTML\n    EvincedReporter.writeEvResultsToFile(\"Evinced-LambdaTest-A11y-HTMLReport\", report, EvincedReporter.FileFormat.HTML);\n    driver.quit();\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Running a test<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We are now ready to execute our test. Here, we are running it on a test site, and this is what the results look like when done:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/06\/runningtest-1024x583.png\" alt=\"Results of running a Selenium test utilizing Lambdatest inside Evinced\" class=\"wp-image-275\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Not only do we gain all of the additional insights provided by LambdaTest such as videos, logs, screenshots, and HAR file to make debugging our functional test quicker and easier, but we also get a detailed Evinced HTML and\/or JSON accessibility report containing all issues found, severity levels, descriptions, effect on end users, and actionable information on how to resolve the issues.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/06\/report-1024x580.png\" alt=\"Detailed Evinced report for accessibility issues from the Selenium test run\" class=\"wp-image-276\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you\u2019re using LambdaTest already, this is a no-brainer, and if you\u2019re not, feel free to <a href=\"https:\/\/www.lambdatest.com\/\">check them out<\/a>. We\u2019re pretty sure that once you start testing accessibility this way, you\u2019ll never way to turn back the clock.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Anyone doing functional tests is interested in getting as much value as possible from them. One way to really up your game is to add accessibility testing as well. Effective today, we\u2019ve made that even easier. We\u2019re announcing native support for LambdaTest inside our Selenium SDK products. If you don\u2019t know, LambdaTest is a hugely [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":1259,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-273","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-products"],"acf":{"authors_to_show":[924]},"_links":{"self":[{"href":"https:\/\/www.evinced.com\/blog\/wp-json\/wp\/v2\/posts\/273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.evinced.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.evinced.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.evinced.com\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.evinced.com\/blog\/wp-json\/wp\/v2\/comments?post=273"}],"version-history":[{"count":4,"href":"https:\/\/www.evinced.com\/blog\/wp-json\/wp\/v2\/posts\/273\/revisions"}],"predecessor-version":[{"id":1309,"href":"https:\/\/www.evinced.com\/blog\/wp-json\/wp\/v2\/posts\/273\/revisions\/1309"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.evinced.com\/blog\/wp-json\/wp\/v2\/media\/1259"}],"wp:attachment":[{"href":"https:\/\/www.evinced.com\/blog\/wp-json\/wp\/v2\/media?parent=273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.evinced.com\/blog\/wp-json\/wp\/v2\/categories?post=273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.evinced.com\/blog\/wp-json\/wp\/v2\/tags?post=273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}