Tutorials and resources on how to apply unit testing in software testing
Self-testing code, or code that can evaluate its own health and tell you if it has problems, is the goal of many software teams who spend effort in testing. How can you achieve this goal? Learn the team practices, the types and amount of tests you need in your repertoire, and technical practices to help you get closer to it.
Agile testing and test automation are almost mandatory for projects that demand high quality as well as short release cycles like Scrum. It acts as a safety net in order to protect existing functionality against bugs resulting from unintended side-effects of recent changes. Software developers “in the trenches” often automate their tests but don’t practice strict Test-Driven Development (TDD).
If unit testing has not always been adopted by software developers, this practice has become more mainstream with Agile approaches. Test-Driven Development and Continuous Integration are two technical approaches that require good unit testing. In this blog post, Maxime Lemaitre discusses attitudes that might make your unit testing fail.
In unit testing, you use mocks to simulate the behavior of other code parts in controlled ways. mock is a Python library for testing that allows you to replace parts of the system under test with mock objects and make assertions about how they have been used. mock has been integrated the Python standard library since version 3.3 under the name unittest.mock.
Ember.js is an open-source client-side JavaScript web application framework based on the model-view-controller (MVC) software architectural pattern. It allows developers to create scalable single-page applications by incorporating common idioms and best practices into a framework that provides a rich object model, declarative two-way data binding, computed properties, automatically-updating templates powered by Handlebars.js, and a router for managing application state.
This talk discusses common pitfalls in writing unreadable, unmaintainable unit tests in JavaScript. Some simple rules can keep you from tearing your hair out in anger three months from now, when things need to change.
Finding common naming conventions for software development items (variables, classes, etc.) is a major factor to help people collaborate in software development projects. Finding good names is also good if you work on your own and have to revisit your code some months after you wrote it. In this blog post Frank Appel discusses his experience with naming JUnit tests.