Introduction to software testing

describe('add', () => {
  it('should add two numbers', () => {
    expect(add(1, 2)).toEqual(3);
  });
});
export function add(left: number, right: number) {
  return left + right;
}

What is software testing?

time

cost

benefit

When should you write tests?

Why coders don't write tests

"I don't need tests, I know that my code works!"

"The requirements will change, and we will have to update the code and the tests!"

"I don't know how to test this code, it performs database queries and http requests!"

50 shades of tests

Made with Slides.com