0

Starting to investigate JavaScript testing frameworks (e.g. QUnit, Jasmine, Mocha etc).

I will require our Developers to be able to follow a TDD/BDD approach, so ideally they will be able to run the tests in Visual Studio (using for example Chutzpah). In addition, the tests will automatically run when the solution is built (Release mode) and on the build server.

However...

Our product is used by many people and we can not control the browser that they use. However, we would like to state that our product will definitely work for various browsers (e.g. Chrome, FireFox, IE) and even for specific versions (e.g. IE 8 => Edge).

That being the case, I'm not clear on how we can take our suite of JavaScript tests and run them for each browser engine. Is this possible? If so, please do let me know how.

Thanks

Griff

1 Answer 1

1

Typically, TDD is done using unit tests rather than UI tests. Even if you can prove that these pass in multiple browsers, it doesn't prove that the application works in multiple browsers, just that the JavaScript does what it is supposed to in multiple browsers - it doesn't take into account the HTML or CSS.

Although there is some value in checking that your unit tests pass in multiple browsers, UI tests can go further and show that the tested functionality at least "works" in different browsers and most UI testing frameworks will support running in different browsers.

However, in my opinion, to back up the statement:

we would like to state that our product will definitely work for various browsers

You really need to manually test in those browsers as in my experience the problems that you see between browsers are typically visual.

Sign up to request clarification or add additional context in comments.

2 Comments

Hi Tom. We do already have UI testing (Selenium etc). But, in our hands, the UI tests are written after the Dev process and (sometimes) may not test every path. In contrast, our TDD approach (which of course happens during the dev process) tests all pathways. I was therefore wondering if our TDD tests could use different browser engines - the developer would know at an early stage if their code had a high chance of getting rejected by QA because it failed in a certain browser. However, I get your point though that the HTML may be optimized for different browsers by the rendering engine.
@DrGriff You may have some luck looking into Karma for tesing on multiple browsers, and Quixote for html/css testing if you are into that.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.