At production environment is important to ensure that applications are working every time we add new features or fixes. If we use automated testing procedures with one step build we ensure healthy apps. There are various software testing suites and one popular is Codeception. The Codeception can be installed locally to project's folder or globally in operating machine.

Software testing using Codeception Suites

First we have to install codeception package using a package manager like php composer. In case of local installation in the command line, we type the following and only for the global case we add the flagging global after the require command

composer require "codeception/codeception=2.1.*"
composer require "codeception/specify=*"
composer require "codeception/verify=*"

global case composer require global "codeception/codeception=2.1.*"

In global machine installation, you can check the packages of composer as typing the following

composer global status

In the global case the packages from composer are installed in the home directory in a hidden folder called .composer let's find it

cd ~/.composer

then we have to add this directory ~/.composer/vendor/bin to the path PATH environment variable in ~/.profile file

add the following
export PATH=$PATH:~/.composer/vendor/bin

Now we can write tests and execute them from the command line using codecept from the command line.

Software testing types on web apps

These three types of tests unit, functional and acceptance Tests. Unit tests are used to verify the correct functionality of small parts of code, for example, a unit test can test function methods against various inputs against the expected results.

A functional test is testing the functionality of using various scenarios that a user do in the applications. The acceptance test is almost the same as functional but the execution can be inside on browser where we can see a visual of testing flow while the test running application. If you want to run the acceptance tests

codecept run acceptance


So before adding new features in the production server we will have to run first all the tests and then we deploy new features with confidence that the application works perfectly. How we run the test could be a part of our deployment strategy that could to orchestrate the deployment a executions of the test scripts with a deployment tool like capistrano , maven orĀ  with Continuous Integration systems like Jenkins, Travis CI, and even Gitlab can execute the test return reports if there is the file gitlab-ci.yml.

Deploying your web applications in confidence wtih software testing automation is important to any project.