Automated testing in web applications

  • webtech

In production environments one of the basics is to make sure that applications are working properly every time we add new features or make fixes in current code base, this can be achieved using automated testing procedures. There are various software testing suites and of one of them is codeception. The codeception can be installed locally inside your project or globally in your development machine, the can be achieved easily using a package manager like composer. In case of local installation in command line we type the following and only for the global case we add the flag global after the require command

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

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

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

composer global status

In the global case the packages from composer are installed in home directory in 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

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

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

There three types of tests unit , functional and acceptance Tests. The unit tests verify small parts of code if works properly for example the unit tests can test the function methods against various inputs against the expected results. Functional tests are testing the functionality of using various scenarios that a user do in the applications. Acceptance is almost the same as functional but the execution can be inside on brower where we can see a visual of testing flow while the test running application. Software testing web application in Saint Louis contact us. If you want to run the acceptance tests

codecept run acceptance

SaaS software, easy to use platform and interface to setup quickly your eshop .