Learning Yii Testing

Embrace 360-degree testing on your Yii 2 projects using Codeception
Preview in Mapt

Learning Yii Testing

Matteo Pescarin

Embrace 360-degree testing on your Yii 2 projects using Codeception

Quick links: > What will you learn?> Table of content

Mapt Subscription
FREE
$29.99/m after trial
eBook
$15.00
RRP $29.99
Save 49%
Print + eBook
$36.99
RRP $36.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$15.00
$36.99
$29.99 p/m after trial
RRP $29.99
RRP $36.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Learning Yii Testing Book Cover
Learning Yii Testing
$ 29.99
$ 15.00
Mastering Yii Book Cover
Mastering Yii
$ 39.99
$ 8.00
Buy 2 for $23.00
Save $46.98
Add to Cart

Book Details

ISBN 139781784392277
Paperback222 pages

Book Description

Testing your application often and early is a key consideration in modern web development. PHP developers using the high-performance PHP framework Yii have access to Codeception, a testing suite that provides comprehensive support for unit, functional, and acceptance tests. With Codeception, you will quickly learn how to create fast, stable applications using a test-driven development methodology. Learning Yii Testing embraces a testing-first strategy to guide you in the implementation of all possible types of tests, covering the core features of Yii 2. Starting with the nuts and bolts of testing, you'll walk through Yii 2's new functionality and improvements and learn how to begin testing with it. You'll explore the world of Codeception and gain insights into key topics such as testing in isolation and component integration tests.

You'll also learn to analyze testing information and improve the quality of your code. At the end of the book, you will be able to use automation tools to reduce your testing workload.

Table of Contents

Chapter 1: The Testing Mindset
Understanding the importance of testing
Involving project management
Obtaining the testing mindset
Summary
Chapter 2: Tooling up for Testing
Downloading and installing Yii 2
Environment and workflow
Introducing Composer
Finding your way around Yii 2
Structure of the default web application
Defining our working strategy
Introducing testing for our purposes
Summary
Chapter 3: Entering Codeception
Getting started with Codeception
Installing Codeception in Yii 2
Interacting with Codeception
Summary
Chapter 4: Isolated Component Testing with PHPUnit
Understanding the work to be done
Using the User model
Implementing the first unit test
Component testing of the model
Implementing the ActiveRecord class and its methods
Seeing tests pass
Summary
Chapter 5: Summoning the Test Doubles
Dealing with external dependencies
Isolating components with stubs
Listening for calls with an observer
Writing maintainable unit tests
Summary
Chapter 6: Testing the API – PHPBrowser to the Rescue
Functional tests in Yii 2
Functional tests for REST interfaces
Creating a RESTful web service with Yii 2
Summary
Chapter 7: Having Fun Doing Browser Testing
Introducing Selenium WebDriver
Creating acceptance tests
Summary
Chapter 8: Analyzing Testing Information
Improving the quality of your tests
Improving our code with the aid of additional tools
Summary
Chapter 9: Eliminating Stress with the Help of Automation
Automating the build process
Creating the required build files
Configuring the Jenkins build
Going forward
Summary

What You Will Learn

  • Understand what testing is, why you need it, and what it encompasses
  • Explore testing using all the features and improvements made available with Yii 2
  • Embrace the Codeception testing framework and exploit its potential
  • Carefully manage the scope of tests according to the application you're writing
  • Write PHPUnit tests using the full range of its capabilities
  • Script functional tests and test REST interfaces
  • Write acceptance tests and make the best use of existing frameworks such as Selenium
  • Discover how to abstract the knowledge you've learned and apply it to any situation

Authors

Table of Contents

Chapter 1: The Testing Mindset
Understanding the importance of testing
Involving project management
Obtaining the testing mindset
Summary
Chapter 2: Tooling up for Testing
Downloading and installing Yii 2
Environment and workflow
Introducing Composer
Finding your way around Yii 2
Structure of the default web application
Defining our working strategy
Introducing testing for our purposes
Summary
Chapter 3: Entering Codeception
Getting started with Codeception
Installing Codeception in Yii 2
Interacting with Codeception
Summary
Chapter 4: Isolated Component Testing with PHPUnit
Understanding the work to be done
Using the User model
Implementing the first unit test
Component testing of the model
Implementing the ActiveRecord class and its methods
Seeing tests pass
Summary
Chapter 5: Summoning the Test Doubles
Dealing with external dependencies
Isolating components with stubs
Listening for calls with an observer
Writing maintainable unit tests
Summary
Chapter 6: Testing the API – PHPBrowser to the Rescue
Functional tests in Yii 2
Functional tests for REST interfaces
Creating a RESTful web service with Yii 2
Summary
Chapter 7: Having Fun Doing Browser Testing
Introducing Selenium WebDriver
Creating acceptance tests
Summary
Chapter 8: Analyzing Testing Information
Improving the quality of your tests
Improving our code with the aid of additional tools
Summary
Chapter 9: Eliminating Stress with the Help of Automation
Automating the build process
Creating the required build files
Configuring the Jenkins build
Going forward
Summary

Book Details

ISBN 139781784392277
Paperback222 pages
Read More

Read More Reviews

Recommended for You

Mastering Yii Book Cover
Mastering Yii
$ 39.99
$ 8.00
Yii2 By Example Book Cover
Yii2 By Example
$ 35.99
$ 18.00
Yii2 Application Development Cookbook - Third Edition Book Cover
Yii2 Application Development Cookbook - Third Edition
$ 39.99
$ 20.00
Software Testing using Visual Studio 2010 Book Cover
Software Testing using Visual Studio 2010
$ 26.99
$ 13.50
Bootstrap 4 By Example Book Cover
Bootstrap 4 By Example
$ 35.99
$ 18.00
Yii Project Blueprints Book Cover
Yii Project Blueprints
$ 29.99
$ 15.00