Tutorials and resources on how to apply unit testing in software testing

Unit Testing: Fakes, Mocks and Stubs

May 23, 2017 0

When you perform unit testing, there are many situations where you don’t have the full code or the right context that is needed to execute it. It might be that part of the code is not written yet or that you interact with an external system that is difficult to access or you don’t want to impact with unit tests. In these cases, you need to create a test double, an object that behaves like its production equivalent. In this article, Michał Lipski describes three types of test doubles – fake, stub and mock – and gives you examples when to use them in your unit testing.

Unit Testing Angular 2 with Jasmine

April 18, 2017 0

Jasmine is an open source behavior-driven development (BDD) framework for testing JavaScript code. Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript (JS) and other languages. In his article, Gerard Sans offers a presentation of Jasmine, discusses the unit testing of AngularJS and shares some Unit Testing recipes for Angular 2: Components, Services, Http and MockBackend, Directives, Pipes, Routes, Observables and EventEmitter.

Automating Cross-browser JavaScript Unit Testing

February 13, 2017 0

What might seem obvious to some people could be weird to other. This is still the case for applying unit testing to JavaScript code in multiple browsers. In his blog post “Learning How to Set Up Automated, Cross-browser JavaScript Unit Testing”, Philip Walton provides a step-by-step approach process to create some automated testing of your JavaScript code.

Testing with Mockito

December 20, 2016 0

Mockito is a popular and powerful open source Java mocking framework. In order to achieve good unit tests, you need to make use of mocks and stubs. And that’s exactly what this talk will be about: What is a mock?

Replacing Rules in JUnit 5

May 17, 2016 0

Rules have disappeared in the version 5 of the JUnit open source Java testing tools. The release 5 of JUnit is still in alpha status. In this article, Herrmann Rüdiger explores what it would take to transform existing rules to the new concept so that they could run natively on JUnit 5.

The End of End-to-End Testing

February 4, 2016 0

End-to-end testing (or system testing) tests a completely integrated system to verify that it meets its requirements. In a blog post, Mike Wacker from Google explains why if this testing strategy sounds good in theory, it goes wrong in practice.

Jasmine Automated Tests for JavaScript

January 11, 2016 0

Jasmine is one of the most popular open source JavaScript unit testing frameworks that allows JavaScript developers to develop “descriptive” testing code which does not necessarily need a JavaScript expert to understand it. Although Jasmine is a popular JavaScript unit testing framework and is used in many web applications, it does not have an out-of the box way to automate the running of its tests because it is designed to run from the browser.

1 2 3 4 5 6 27