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

Cucumber

961
911
+ 1
36
Selenium

15.4K
12.3K
+ 1
525
Add tool

Cucumber vs Selenium: What are the differences?

<Write Introduction here>
  1. Programming Language: One key difference between Cucumber and Selenium is that Cucumber is primarily focused on behavior-driven development (BDD) and uses the Gherkin language to write test scripts in natural language format, while Selenium is more focused on web application testing and supports multiple programming languages such as Java, Python, and C# for writing test scripts.

  2. Testing Scope: Another difference is that Cucumber is more suitable for acceptance testing and collaboration between non-technical and technical team members to define application behavior, whereas Selenium is more focused on functional and regression testing of web applications at the UI level.

  3. User Involvement: Cucumber encourages active involvement of non-technical stakeholders in the testing process by allowing them to write feature files in plain text using Gherkin syntax, while Selenium requires testers to have strong programming skills to write automation scripts and perform test automation.

  4. Integration: Cucumber can be integrated with various testing frameworks and tools such as JUnit and TestNG to execute test scenarios, while Selenium can be integrated with tools like Maven, Jenkins, and Docker for continuous integration and deployment of test automation.

  5. Reporting and Collaboration: Cucumber provides detailed and readable reports for test results, including failed scenarios with descriptive error messages, which can be shared easily with team members for collaboration and analysis, while Selenium requires additional plugins or libraries for generating comprehensive test reports.

  6. Browser Support: Selenium supports various web browsers such as Chrome, Firefox, and Safari for cross-browser testing, ensuring that web applications are compatible across different platforms, whereas Cucumber focuses more on testing application behavior and may not offer extensive browser support out of the box.

In Summary, Cucumber and Selenium differ in terms of programming language focus, testing scope, user involvement, integration capabilities, reporting features, and browser support.
Advice on Cucumber and Selenium
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 · 216K views
Recommends
on
SeleniumSelenium

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

See more
Decisions about Cucumber and Selenium

We use Selenium for our FDA validation testing.

For those not familiar with FDA and NASA quality control initiatives and testing requirements, suffice it to say that the federal government tends to talk in terms of 'validation and verification testing' in many of its' regulations. There's decades of history behind this term, and the three important takeaways are the following:

First, a project has to have two or more testing strategies, so as not to fall into a bias with a single testing strategy. Second, one of those testing strategies has to be user-centric, commonly known as validation testing. Examples include crash test dummies and end-to-end software acceptance tests. Third, most any other testing strategy can qualify as verification testing.

So, we use Selenium for our FDA validation testing, because it simulates a user walking through the software.

It's big and bloated and slow, and the legacy version runs on Java, and it's brittle and doubles the amount of code we have to write, and is otherwise a total pain in the ass. But it's like folding your parachute before skydiving or having a depth gauge when SCUBA diving or placing bolts when climbing a wall. There are simply some tasks that you don't want to do without safety gear.

And for all its' pain to use, Selenium is like safety gear for building your tech stack. We've migrated across a half a dozen user interfaces, two entirely different back-end languages, three or four data protocols, and countless utilities over the years. And Selenium warns us when we're in danger and it catches us when we fall.

See more

As bioinformaticists, we regularly get asked to develop apps or websites which are HIPAA compliant, connect to an EHR, or are ready for FDA regulation.

Regarding the last, the FDA has built up best practices over the past 40 or 50 years regarding "validation and verification" testing. Without going into a lengthy history of FDA regulations, suffice it to say that there are two important distinctions about validation and verification testing - the first of which is that there has to be more than one testing methodology, so that manufacturers or developers don't get a sort of biased tunnel vision; and the second is that at least one of the testing methodologies has to be user-centric. So, it's not enough to test the engine of a car, a manufacturer also must have crash test dummies.

In the world of software written for hospitals and clinical environments, we interpret the verification and validation testing requirements in terms of requiring more than one testing framework, one of which is an end-to-end testing harness using a technology like Selenium. It's not enough to have unit testing, but we also need e2e acceptance testing. Selenium has traditionally been the only game in town, and has been a struggle to work with at times. But it's a tank, and keeps on rolling. We particularly like recent incarnations using Chromedriver and WebDriver protocols, which is slowly reducing the reliance on the legacy Java server.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Cucumber
Pros of Selenium
  • 20
    Simple Syntax
  • 8
    Simple usage
  • 5
    Huge community
  • 3
    Nice report
  • 175
    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

Sign up to add or upvote prosMake informed product decisions

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

    Sign up to add or upvote consMake informed product decisions

    - No public GitHub repository available -

    What is 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.

    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.

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

    What companies use Cucumber?
    What companies use Selenium?
    See which teams inside your own company are using Cucumber or Selenium.
    Sign up for StackShare EnterpriseLearn More

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

    What tools integrate with Cucumber?
    What tools integrate with Selenium?

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

    Blog Posts

    What are some alternatives to Cucumber and Selenium?
    RSpec
    Behaviour Driven Development for Ruby. Making TDD Productive and Fun.
    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.
    JUnit
    JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks.
    Celery
    Celery is an asynchronous task queue/job queue based on distributed message passing. It is focused on real-time operation, but supports scheduling as well.
    PHPUnit
    PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks.
    See all alternatives