Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8860007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:11:10+00:00 2026-06-14T15:11:10+00:00

I am a novice in testing. I am working on Linux. I was reading

  • 0

I am a novice in testing.

I am working on Linux.
I was reading about testing in headless mode and came across two things. One was X virtual frame buffer which does graphical operations in memory. So, no output is displayed. The implementation details I found in this link http://www.seleniumtests.com/2012/04/headless-tests-with-firefox-webdriver.html.

The other one that I came across was HtmlUnitDriver. This also does not open any browser while running the test. I wrote a basic sample code using HtmlUnitDriver and the assertions seem to work fine.

I understand that HtmlUnitDriver doesn’t work too well with javascript. But apart from this, are there any major differences to choose one over the other?

I am going to be testing a web application that does have some abount of javascript in it.

I am a novice in this field. So, any answers, suggestions, etc. will be appreciated.
Thank you in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T15:11:11+00:00Added an answer on June 14, 2026 at 3:11 pm

    From my experience with both approaches:

    • HtmlUnit will in most practical cases be faster than a real browser with xvfb — simply because it doesn’t spend time rendering the pages. (A data point: 17 secs. HtmlDriver vs. 62 secs. FirefoxDriver for a specific test suite I’m using now).
    • It is easier to run several tests concurrently — and it consumes a lot less resources — using HtmlUnit. This can be very important if you have a large number of tests and you need them to finish fast (e.g. you want to follow the 10-minute-build rule).
    • As you said, HtmlUnit has its own quirks with JavaScript and the DOM. Not better or worse than any other browser (Firefox, Safari, IE, Chrome, … — they all have their own quirks), but one on which it is very questionable to spend time fixing bugs. I also find such bugs very difficult to diagnose, but that may be only my ignorance.
    • One advantage of real browsers + xvfb is that you can always use the exact same tests without xvfb and see what’s going on — possibly even use a console to run some JavaScript to diagnose issues. I sometimes feel quite blind when working with HtmlUnit, and because of above-mentioned quirks you can’t always use the same exact tests code in both environments.

    So, in summary, unless total test duration is important and you’re ready to spend some time fighting HtmlUnit, it’s just easier to go with a regular browser + xvfb.

    I also like using xvnc, which has the added benefit of allowing you to connect to the screen of a running test and see what’s going on (not sure whether you can do that with xvfb).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with Drupal's automated testing in PHP. It's a class that has two
I've started testing out Nancy in self-host mode. So far, so good apart from
I'm a Lua novice. I'm unit testing Lua 5.1 code using Lunity and LeMock
I've been reading here a few questions regarding the use of unit testing to
I'm novice in unit testing field, so I have some questions: Is it a
NOTE: Using Rails 3.0.7, Postgresql 8.4.4-1, rake 0.8.7. Trying to get rails testing working.
I just came across this seemingly innocuous comment , benchmarking ArrayList vs a raw
I admit - I'm a complete novice when it comes to unit testing. I
Disclaimer: Prism Novice. I'm reading up furiously to make up for lost time though
I tried Javas Hotswap today, and its working quite nice. During my testing i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.