Daniel de la Cruz Calvo
Software Engineer and professional mentor for developers.
Test-driven development, or TDD, is just an iterative and incremental problem solving methodology
Plan: Decide what your software will do
Code: Write in how your software will do it
Build: Get a first feedback to ensure you haven't screwed up
Test: Ensure that your code does what was expected
Release: Put it into production
vs Continuous deployment
The lowest level testing technique consisting of test cases for the smallest possible units of code. A single unit test usually checks only a particular small behavior, and a unit test case usually covers all functionality of a particular single function or class.
High-level testing that consists in a process of verifying that a solution works for the user.
Refactoring is a controlled technique for improving the design of an existing code base.
Assertions are statements that perform an actual check on the software's output.
Test doubles are objects the test code creates and passes to the SUT (software under test) to replace real dependencies.
A particular environment that must be set up before a test can be run. It generally consists of setting up all test doubles and other dependencies for the software under test.
Any kind of metric that attempts to estimate the likelihood of important behavior of the SUT still not covered by tests.
A domain-specific language, business readable, that lets you describe your software behaviour without detailing how dat behaviour is implemented
Scenario: Gherkin example
Given one thing
And another thing
And yet another thing
When I open my eyes
Then I see something
But I don't see something elseMocha is a feature-rich JavaScript test framework running on Node.js and the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases.
Chai is a BDD / TDD assertion library for node and the browser that can be delightfully paired with any javascript testing framework.
Code coverage tools which provide coverage reports.
Standalone test spies, stubs and mocks for JavaScript.
No dependencies, works with any unit testing framework.
A simple tool that allows you to execute JavaScript code in multiple real browsers.
A behaviour-driven development tool. Translates Gherkin syntax into automatic tests.
Scenario: Gherkin example
Given one thing
And another thing
And yet another thing
When I open my eyes
Then I see something
But I don't see something elseBy Daniel de la Cruz Calvo
An introduction of concepts and tools for doing test driven development. A speech oriented to frontend developers.
Software Engineer and professional mentor for developers.