Get Advice Icon

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

Jasmine

2.6K
1.5K
+ 1
186
PhantomJS

1.2K
430
+ 1
18
Add tool

Jasmine vs PhantomJS: What are the differences?

What is Jasmine? DOM-less simple JavaScript testing framework. Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus it's suited for websites, Node.js projects, or anywhere that JavaScript can run.

What is PhantomJS? Scriptable Headless WebKit. PhantomJS (www.phantomjs.org) is a headless WebKit scriptable with JavaScript. It is used by hundreds of developers and dozens of organizations for web-related development workflow.

Jasmine can be classified as a tool in the "Javascript Testing Framework" category, while PhantomJS is grouped under "Headless Browsers".

"Can also be used for tdd " is the primary reason why developers consider Jasmine over the competitors, whereas "Scriptable web browser" was stated as the key factor in picking PhantomJS.

Jasmine and PhantomJS are both open source tools. It seems that PhantomJS with 26.9K GitHub stars and 5.7K forks on GitHub has more adoption than Jasmine with 14.4K GitHub stars and 2.12K GitHub forks.

Typeform, Coderus, and Zenefits are some of the popular companies that use Jasmine, whereas PhantomJS is used by Key Location, Indiegogo, and Tailor Brands. Jasmine has a broader approval, being mentioned in 143 company stacks & 75 developers stacks; compared to PhantomJS, which is listed in 77 company stacks and 47 developer stacks.

Advice on Jasmine and PhantomJS
Ankur Loriya
Needs advice
on
PhantomJSPhantomJS
and
PuppeteerPuppeteer

I am using Node 12 for server scripting and have a function to generate PDF and send it to a browser. Currently, we are using PhantomJS to generate a PDF. Some web post shows that we can achieve PDF generation using Puppeteer. I was a bit confused. Should we move to puppeteerJS? Which one is better with NodeJS for generating PDF?

See more
Replies (2)
Recommends
on
PuppeteerPuppeteer

You better go with puppeteer. It is basically chrome automation tool, written in nodejs. So what you get is PDF, generated by chrome itself. I guess there is hardly better PDF generation tool for the web. Phantomjs is already more or less outdated as technology. It uses some old webkit port that's quite behind in terms of standards and features. It can be replaced with puppeteer for every single task.

See more
Recommends
on
PuppeteerPuppeteer

I suggest puppeteer to go for. It is simple and easy to set up. Only limitaiton is it can be used only for chrome browser and currently they are looking into expanding into FF. The next thing is Playwright which is just a scale up of Puppeteer. It supports cross browsers.

See more
Decisions about Jasmine and PhantomJS

We use Mocha for our FDA verification testing. It's integrated into Meteor, our upstream web application framework. We like how battle tested it is, its' syntax, its' options of reporters, and countless other features. Most everybody can agree on mocha, and that gets us half-way through our FDA verification and validation (V&V) testing strategy.

See more
Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Jasmine
Pros of PhantomJS
  • 64
    Can also be used for tdd
  • 49
    Open source
  • 18
    Originally from RSpec
  • 15
    Great community
  • 14
    No dependencies, not even DOM
  • 10
    Easy to setup
  • 8
    Simple
  • 3
    Created by Pivotal-Labs
  • 2
    Works with KarmaJs
  • 1
    Jasmine is faster than selenium in angular application
  • 1
    SpyOn to fake calls
  • 1
    Async and promises are easy calls with "done"
  • 13
    Scriptable web browser
  • 3
    Depends on QT
  • 2
    No ECMAScript 6

Sign up to add or upvote prosMake informed product decisions

Cons of Jasmine
Cons of PhantomJS
  • 2
    Unfriendly error logs
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    - No public GitHub repository available -

    What is Jasmine?

    Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus it's suited for websites, Node.js projects, or anywhere that JavaScript can run.

    What is PhantomJS?

    PhantomJS is a headless WebKit scriptable with JavaScript. It is used by hundreds of developers and dozens of organizations for web-related development workflow.

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

    What companies use Jasmine?
    What companies use PhantomJS?
    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 Jasmine?
    What tools integrate with PhantomJS?

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

    What are some alternatives to Jasmine and PhantomJS?
    Mocha
    Mocha is a feature-rich JavaScript test framework running on node.js and the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases.
    Jest
    Jest provides you with multiple layers on top of Jasmine.
    Karma
    Karma is not a testing framework, nor an assertion library. Karma just launches a HTTP server, and generates the test runner HTML file you probably already know from your favourite testing framework. So for testing purposes you can use pretty much anything you like.
    Git
    Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
    GitHub
    GitHub is the best place to share code with friends, co-workers, classmates, and complete strangers. Over three million people use GitHub to build amazing things together.
    See all alternatives