JavaScript test-automation

Open-source JavaScript projects categorized as test-automation

Top 15 JavaScript test-automation Projects

  • Cypress

    Fast, easy and reliable testing for anything that runs in a browser.

  • Project mention: Simulating Internet Outage and Recovery using Cypress | dev.to | 2024-01-25

    In this blog post, we'll explore a Cypress test that replicates this scenario, utilizing the powerful intercept command to manipulate network requests and responses.

  • appium

    Cross-platform automation framework for all kinds of apps, built on top of the W3C WebDriver protocol

  • Project mention: React Native Testing Options Overview | dev.to | 2024-05-14

    There are two well-supported solutions on the market for mobile apps testing. Gray box end-to-end testing and automation library called Detox, and open source, a cross-platform test automation tool for native, hybrid and mobile apps called Appium.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • Detox

    Gray box end-to-end testing and automation framework for mobile apps

  • Project mention: React Native Testing Options Overview | dev.to | 2024-05-14

    There are two well-supported solutions on the market for mobile apps testing. Gray box end-to-end testing and automation library called Detox, and open source, a cross-platform test automation tool for native, hybrid and mobile apps called Appium.

  • TestCafe

    A Node.js tool to automate end-to-end web testing.

  • mountebank

    Over the wire test doubles

  • main

    Node.js mock server running live, interactive mocks in place of real APIs (by mocks-server)

  • jest-opentelemetry

    Easily run integration tests for your backends

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • test-each

    🤖 Repeat tests. Repeat tests. Repeat tests.

  • restqa

    🦏 | Best in class Microservice automation testing. Test Driven Happiness

  • cypress-recorder

    A Cypress plugin that generates test scripts from your interactions, a replacement Cypress Studio for Cypress v10 🖱 ⌨

  • Project mention: Show HN: HyperDX – open-source dev-friendly Datadog alternative | news.ycombinator.com | 2023-09-18

    Looks great

    1. Are you funded?

    2. https://www.deploysentinel.com/ - Are you going to work on this further?

  • NodeJs-Cucumber-Selenium

    Run test automation on cloud with Cucumber.js and LambdaTest. This is a sample repo to help you execute Cucumber.js framework based test scripts in parallel with LambdaTest automation testing cloud

  • Project mention: JUnit Tutorial: An Inclusive Guide [With Enhanced Features] | dev.to | 2024-05-13

    import org.openqa.selenium.By; import org.junit.jupiter.api.*; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; 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 java.net.MalformedURLException; import java.net.URL; import java.util.List; import java.util.concurrent.TimeUnit; public class RunningTestsInParallelInGrid { String username = "YOUR_USERNAME"; //Enter your username String accesskey = "YOUR_ACCESS_KEY"; //Enter your accesskey static RemoteWebDriver driver = null; String gridURL = "@ hub.lambdatest.com/wd/hub"; String urlToTest = "https://www.lambdatest.com/"; @ BeforeAll public static void start() { System.out.println("=======Running junit 5 tests in parallel in LambdaTest Grid has started========"); } @ BeforeEach public void setup() { System.out.println("Setting up the drivers and browsers"); DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("browserName", "chrome"); //To specify the browser capabilities.setCapability("version", "70.0"); //To specify the browser version capabilities.setCapability("platform", "win10"); // To specify the OS capabilities.setCapability("build", "Running_ParallelJunit5Tests_In_Grid"); //To identify the test capabilities.setCapability("name", "Parallel_JUnit5Tests"); capabilities.setCapability("network", true); // To enable network logs capabilities.setCapability("visual", true); // To enable step by step screenshot capabilities.setCapability("video", true); // To enable video recording capabilities.setCapability("console", true); // To capture console logs try { driver = new RemoteWebDriver(new URL("https://" + username + ":" + accesskey + gridURL), capabilities); } catch (MalformedURLException e) { System.out.println("Invalid grid URL"); } catch (Exception e) { System.out.println(e.getMessage()); } } @ Test @ DisplayName("Title_Test") @ Tag("Sanity") public void launchAndVerifyTitle_Test() { String methodName = Thread.currentThread() .getStackTrace()[1] .getMethodName(); System.out.println("********Execution of "+methodName+" has been started********"); System.out.println("Launching LambdaTest website started.."); driver.get(urlToTest); driver.manage().window().maximize(); driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS); String actualTitle = driver.getTitle(); System.out.println("The page title is "+actualTitle); String expectedTitle ="Most Powerful Cross Browser Testing Tool Online | LambdaTest"; System.out.println("Verifying the title of the webpage started"); Assertions.assertEquals(expectedTitle, actualTitle); System.out.println("The webpage has been launched and the title of the webpage has been veriified successfully"); System.out.println("********Execution of "+methodName+" has ended********"); } @ Test @ DisplayName("Login_Test") @ Tag("Sanity") public void login_Test() { String methodName = Thread.currentThread() .getStackTrace()[1] .getMethodName(); System.out.println("********Execution of "+methodName+" has been started********"); System.out.println("Launching LambdaTest website started.."); driver.get(urlToTest); driver.manage().window().maximize(); driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS); WebElement login = driver.findElement(By.xpath("//a[text()='Login']")); login.click(); WebElement username = driver.findElement(By.xpath("//input[@ name="email"]")); WebElement password = driver.findElement(By.xpath("//input[@ name="password"]")); WebDriverWait wait = new WebDriverWait(driver,20); wait.until(ExpectedConditions.visibilityOf(username)); username.clear(); username.sendKeys("acvdd@ gmail.com"); password.clear(); password.sendKeys("abc@ 123"); WebElement loginButton = driver.findElement(By.xpath("//button[text()='Login']")); loginButton.click(); driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS); String actual = driver.getTitle(); String expected = "Welcome - LambdaTest"; Assertions.assertEquals(expected, actual); System.out.println("The user has been successfully logged in"); System.out.println("********Execution of "+methodName+" has ended********"); } @ Test @ DisplayName("Logo_Test") public void logo_Test() { String methodName = Thread.currentThread() .getStackTrace()[1] .getMethodName(); System.out.println("********Execution of "+methodName+" has been started********"); System.out.println("Launching LambdaTest website started.."); driver.get(urlToTest); driver.manage().window().maximize(); driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS); System.out.println("Verifying of webpage logo started.."); WebElement logo = driver.findElement(By.xpath("//*[@ id="header"]/nav/div/div/div[1]/div/a/img")); boolean is_logo_present = logo.isDisplayed(); if(is_logo_present) { System.out.println("The logo of LambdaTest is displayed"); } else { Assertions.assertFalse(is_logo_present,"Logo is not present"); } System.out.println("********Execution of "+methodName+" has ended********"); } @ Test @ DisplayName("Blog_Test") public void blogPage_Test() { String methodName = Thread.currentThread() .getStackTrace()[1] .getMethodName(); System.out.println("********Execution of "+methodName+" has been started********"); System.out.println("Launching LambdaTest website started.."); driver.get(urlToTest); driver.manage().window().maximize(); driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS); WebElement resources = driver.findElement(By.xpath("//*[text()='Resources ']")); List options_under_resources = driver.findElements(By.xpath("//*[text()='Resources ']/../ul/a")); boolean flag = resources.isDisplayed(); if(flag) { System.out.println("Resources header is visible in the webpage"); Actions action = new Actions(driver); action.moveToElement(resources).build().perform(); WebDriverWait wait=new WebDriverWait(driver, 20); wait.until(ExpectedConditions.visibilityOfAllElements(options_under_resources)); for(WebElement element : options_under_resources) { if(element.getText().equals("Blog")){ System.out.println("Clicking Blog option has started"); element.click(); System.out.println("Clicking Blog option has ended"); driver.manage().timeouts().pageLoadTimeout(20,TimeUnit.SECONDS); Assertions.assertEquals("LambdaTest Blogs", driver.getTitle()); break; } else Assertions.fail("Blogs option is not available"); } } else { Assertions.fail("Resources header is not visible"); } System.out.println("********Execution of "+methodName+" has ended********"); } @ Test @ DisplayName("Cerification_Test") public void certificationPage_Test() { String methodName = Thread.currentThread() .getStackTrace()[1] .getMethodName(); System.out.println("********Execution of "+methodName+" has been started********"); System.out.println("Launching LambdaTest website started.."); driver.get(urlToTest); driver.manage().window().maximize(); driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS); WebElement resources = driver.findElement(By.xpath("//*[text()='Resources ']")); List options_under_resources = driver.findElements(By.xpath("//*[text()='Resources ']/../ul/a")); boolean flag = resources.isDisplayed(); if(flag) { System.out.println("Resources header is visible in the webpage"); Actions action = new Actions(driver); action.moveToElement(resources).build().perform(); WebDriverWait wait = new WebDriverWait(driver, 20); wait.until(ExpectedConditions.visibilityOfAllElements(options_under_resources)); for (int i = 0; i < options_under_resources.size(); i++) { String value = options_under_resources.get(i).getText(); if (value.equals("Certifications")) { System.out.println("Clicking Certifications option has started"); action.moveToElement(options_under_resources.get(i)).build().perform(); options_under_resources.get(i).click(); System.out.println("Clicking Certifications option has ended"); driver.manage().timeouts().pageLoadTimeout(20, TimeUnit.SECONDS); String expectedCertificationPageTitle = "LambdaTest Selenium Certifications - Best Certifications For Automation Testing Professionals"; String actualCertificationPageTitle = driver.getTitle(); Assertions.assertEquals(expectedCertificationPageTitle, actualCertificationPageTitle); break; } } } System.out.println("********Execution of "+methodName+" has ended********"); } @ Test @ DisplayName("Support_Test") public void supportPage_Test() { String methodName = Thread.currentThread() .getStackTrace()[1] .getMethodName(); System.out.println("********Execution of "+methodName+" has been started********"); System.out.println("Launching LambdaTest website started.."); driver.get(urlToTest); driver.manage().window().maximize(); driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS); WebElement supportHeader = driver.findElement(By.xpath("(//div//*[text()='Support'])[1]")); boolean flag = supportHeader.isDisplayed(); if(flag) { System.out.println("support header is visible in the webpage"); supportHeader.click(); } else { Assertions.fail("support header is not visible"); } System.out.println("********Execution of "+methodName+" has ended********"); } @ AfterEach public void tearDown() { System.out.println("Quitting the browsers has started"); driver.quit(); System.out.println("Quitting the browsers has ended"); } @ AfterAll public static void end() { System.out.println("Tests ended"); } }

  • muenchhausen

    Produce authentic fake data

  • nightwatch-selenium-sample

    Run test automation on cloud with NightwatchJS and LambdaTest. This is a sample repo to help you execute NightwatchJS framework based test scripts in parallel with LambdaTest automation testing cloud

  • gpt-contextfiles

    vscode extension, add a file, ask gpt3.5 with all the files you pass into it up to 16k tokens

  • Project mention: I made my first vscode extension that allows GPT to use many files easily | /r/vscode | 2023-06-25

    Github: https://github.com/Iheuzio/gpt-contextfiles

  • cypress-health-check

    Simple page health check test suite powered by Cypress and CircleCI

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

JavaScript test-automation related posts

  • JUnit Tutorial: An Inclusive Guide [With Enhanced Features]

    1 project | dev.to | 13 May 2024
  • Top 28 Selenium WebDriver Commands in NUnit For Test Automation

    1 project | dev.to | 2 Apr 2024
  • How to Handle iFrames in Playwright

    1 project | dev.to | 22 Jan 2024
  • How To Use Playwright How To Use Playwright For Web Scraping with Python

    2 projects | dev.to | 30 Nov 2023
  • Exception Handling In Cypress: A Comprehensive Guide

    3 projects | dev.to | 9 Oct 2023
  • Perform Easy Cross Browser Testing With LambdaTest WordPress Plugin

    1 project | dev.to | 25 Sep 2023
  • How To Use Arrays.asList() In Java [With Examples]

    1 project | dev.to | 4 Aug 2023
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 1 Jun 2024
    Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →

Index

What are some of the best open-source test-automation projects in JavaScript? This list will help you:

Project Stars
1 Cypress 46,278
2 appium 18,079
3 Detox 11,002
4 TestCafe 9,775
5 mountebank 1,981
6 main 280
7 jest-opentelemetry 256
8 test-each 110
9 restqa 80
10 cypress-recorder 22
11 NodeJs-Cucumber-Selenium 20
12 muenchhausen 20
13 nightwatch-selenium-sample 16
14 gpt-contextfiles 12
15 cypress-health-check 0

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com