Need advice about which tool to choose?Ask the StackShare community!

Selenium

15.6K
12.5K
+ 1
527
TestNG

474
196
+ 1
0
Add tool

Selenium vs TestNG: What are the differences?

  1. Testing Framework: Selenium is mainly used for automating web applications testing, while TestNG is a testing framework that integrates seamlessly with Selenium for test case execution, grouping, and parallel testing.
  2. Annotations: Selenium does not provide built-in support for annotations like TestNG does, which allows for easier test case organization and execution control.
  3. Reporting: TestNG offers comprehensive reporting features such as HTML reports, test case-wise reporting, and graphical representation of test results, which are not readily available in Selenium.
  4. Parameterization: TestNG allows for parameterization of test cases through the use of data providers, making it easier to run the same test case with different input values, whereas Selenium requires manual code modifications for parameterization.
  5. Dependencies: TestNG provides the ability to define dependencies between test methods, ensuring that one test method runs only after the successful execution of another, a feature not natively supported in Selenium.
  6. Data-Driven Testing: TestNG supports data-driven testing, where test cases can be executed with different sets of data retrieved from external sources like Excel files, databases, or CSV files, which Selenium lacks in-built support for.

In Summary, Selenium focuses on web automation testing, while TestNG acts as a testing framework that complements Selenium by providing features like annotations, reporting, parameterization, dependencies, and data-driven testing.

Advice on Selenium and TestNG
Needs advice
on
JestJestSeleniumSelenium
and
WebdriverIOWebdriverIO
in

we are having one web application developed in Reacts.js. in the application, we have only 4 to 5 pages that we need to test. I am having experience in selenium with java. Please suggets which tool I should use. and why ............................ ............................ .............................

See more
Replies (1)
Prashanth Marappa
Senior Software Engineer at Mphasis · | 1 upvotes · 227.1K views
Recommends
on
SeleniumSelenium

with the help of selenium we can automate react js for functional testing

See more
Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Selenium
Pros of TestNG
  • 177
    Automates browsers
  • 154
    Testing
  • 101
    Essential tool for running test automation
  • 24
    Record-Playback
  • 24
    Remote Control
  • 8
    Data crawling
  • 7
    Supports end to end testing
  • 6
    Easy set up
  • 6
    Functional testing
  • 4
    The Most flexible monitoring system
  • 3
    End to End Testing
  • 3
    Easy to integrate with build tools
  • 2
    Comparing the performance selenium is faster than jasm
  • 2
    Record and playback
  • 2
    Compatible with Python
  • 2
    Easy to scale
  • 2
    Integration Tests
  • 0
    Integrated into Selenium-Jupiter framework
    Be the first to leave a pro

    Sign up to add or upvote prosMake informed product decisions

    Cons of Selenium
    Cons of TestNG
    • 8
      Flaky tests
    • 4
      Slow as needs to make browser (even with no gui)
    • 2
      Update browser drivers
      Be the first to leave a con

      Sign up to add or upvote consMake informed product decisions

      - No public GitHub repository available -

      What is Selenium?

      Selenium automates browsers. That's it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well.

      What is TestNG?

      It is a testing framework designed to simplify a broad range of testing needs, it covers all categories of tests: unit, functional, end-to-end, integration, etc.Run your tests in arbitrarily big thread pools with various policies available (all methods in their own thread, one thread per test class, etc.

      Need advice about which tool to choose?Ask the StackShare community!

      What companies use Selenium?
      What companies use TestNG?
      Manage your open source components, licenses, and vulnerabilities
      Learn More

      Sign up to get full access to all the companiesMake informed product decisions

      What tools integrate with Selenium?
      What tools integrate with TestNG?

      Sign up to get full access to all the tool integrationsMake informed product decisions

      Blog Posts

      What are some alternatives to Selenium and TestNG?
      Protractor
      Protractor is an end-to-end test framework for Angular and AngularJS applications. Protractor runs tests against your application running in a real browser, interacting with it as a user would.
      Cypress
      Cypress is a front end automated testing application created for the modern web. Cypress is built on a new architecture and runs in the same run-loop as the application being tested. As a result Cypress provides better, faster, and more reliable testing for anything that runs in a browser. Cypress works on any front-end framework or website.
      Nightwatchjs
      Nightwatch.js is an easy to use Node.js based End-to-End (E2E) testing solution for browser based apps and websites. It uses the powerful Selenium WebDriver API to perform commands and assertions on DOM elements.
      Puppeteer
      Puppeteer is a Node library which provides a high-level API to control headless Chrome over the DevTools Protocol. It can also be configured to use full (non-headless) Chrome.
      Cucumber
      Cucumber is a tool that supports Behaviour-Driven Development (BDD) - a software development process that aims to enhance software quality and reduce maintenance costs.
      See all alternatives