1

I am currently working on some software, for which, the front end is being developed using AngularJS.

We would like to incorporate some automated testing into our development lifecycle, so that we can write a test suite, with a number of tests that will be run on the front end every time we add a new feature/ fix a bug/ make changes to either the front or back end, to ensure that everything is still working as expected.

I have done a bit of research, and found a number of testing frameworks available, such as Mocha, Jasmine, Jest, QUnit, Intern & Sinon.

I have not really used automated testing/ testing frameworks much at all in my previous development experience, other than using JUnit briefly while developing in Java at university, as automated testing hasn't been in place in most of the places that I have worked- in some cases, due to the nature of the software being developed (manual testing, rather than automated was a requirement), and environments in which it was used, and in other cases due to the nature of company- small, relatively young, and still establishing methods of best practice, or a small development team within a company in an industry other than IT, etc.

The main purpose of the framework/ library will be to simulate a user's interaction with the software, so clicking links/ buttons/ menus, selecting checkboxes, any other user interaction, and ensuring that the actual effect of the action is identical to the desired effect.

So, my first question is: what should I bare in mind while looking into what testing frameworks we could possibly use? Are there particular features, or other things that some frameworks provide and other don't, which I would definitely want to look out for?

Secondly, how can I best assess which framework/ library is going to be the most appropriate to use for the software we're developing? Is it just a case a picking one and giving it a go? It seems probable that I could waste quite a lot of time doing it this way, as I don't really know where to get started in what I'm looking for.

What questions should I ask about a framework/ library before trying it out? Does anyone have any recommendations for a few libraries that I should try out first?

1 Answer 1

2

First of all, unless you have really specific testing needs pretty much all of the tools you mention are appropriate as part of a testing stack.

For testing an application with an angular frontend at the browser level the obvious first choice is probably Protractor if your team isn't afraid of javascript. Protractor takes some of the work out of combining the various pieces of the testing stack (test runner/framework, selenium library, test results generation, etc.) Instead, you'll deal with most of that in a single configuration file. Additionally, Protractor extends the official javascript selenium driver, selenium-webdriver, with additional functionality specific for angular testing including ng-based selectors and some limited awareness of when the application has finished loading.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.