Curso Unit Testing with PHPUnit

  • Test & Point Analysis

Curso Unit Testing with PHPUnit

24 horas
Visão Geral

O Curso Unit Testing with PHPUnit cobre a instalação do phpunit, escrita e execução de suítes de testes de unidade usando a estrutura phpunit.

Pre-Requisitos
  • Bons conhecimentos de PHP
Materiais
Inglês + Exercícios + Lab Pratico
Conteúdo Programatico

Introduction To Unit Test

  1. What are unit tests ?
  2. Pros and cons
  3. The FIRST rule

Introduction To Php Unit

  1. Introduction to PHP Unit
  2. Open Source PHP projects use PHP Unit
  3. IDEs integration
  4. PHPUnit installation from PEAR

Write Your First Assertions

  1. Introduction to the Command Line Interface
  2. Write a first tests suite
  3. Run the test suite from the command line tool

Initialize And Reset A Test

  1. Setup a tests suite with the setup() method
  2. Reset a testing environment with the tearDown() method
  3. Introduction to fixtures

Testing Exceptions

  1. Write unit tests for methods, which can handle exceptions
  2. Testing exception with the setExpectedException() assertion method
  3. Testing exception by using the @expectedException annotation
  4. Testing exception thanks to a try { } catch code block

Test Driven Development

  1. Understanding the test driven development (TDD) methodology
  2. Main advantages of the TDD approach
  3. Implement code thanks to a test driven development approach

Data Providers And Fixtures

  1. Understanding the data providers and fixtures concepts
  2. Create a new data provider method to run a test with several values

Advanced Testing Practices

  1. Testing exceptions
  2. Using data providers to create fixtures
  3. Assertions to test a class and its attributes
  4. Assertions to test Boolean values
  5. Assertions to test string values
  6. Assertions to test XML values

Code Coverage Analysis

  1. Understanding the code coverage concept
  2. Check XDebug extension is installed on the web server
  3. Generate a complete code coverage report from the command line interface
  4. Analyzing and understanding generated reports and statistics
  5. Understanding and using the special @covers annotation
  6. Ignore code blocks from coverage process thanks to @codeCoverageIgnore (Start|End) annotation

Using Mock Objects

  1. Discovering and creating mock objects
  2. Test data model coupled to mock objects
  3. Check code coverage rate thanks to advanced unit tests

Generating Reports

  1. Export results as XML
  2. Export results as JSON
  3. Export results as TAP
  4. Check code coverage rate thanks to advanced unit tests

Monitoring The Tests Suite With Jenkins

  1. Discovering the continuous integration practice
  2. Installing and running a continuous integration tool
TENHO INTERESSE

Cursos Relacionados

Curso Teste Ágil Nível Intermediário

24 horas

Curso Analista de Teste Nível Avançado

24 horas

Curso Requisitos e Validação de Teste

24 horas

Curso Fundamento de Teste de Software

24 horas

Curso APF Analise de Ponto de Função Exame CFPS IFPUG

32 horas

Curso Analise de Ponto de Função Certificação do IFPUG

32 Horas

Curso Teste de Software Ágil Foundation

16 horas

Curso Teste de Software Fundamentos

24 horas

Curso APP Mobile Testing Foundation

16 horas

Curso Automação de Teste Agil

16 horas