Testing Joomla Extensions with Codeception: Difference between revisions

From Joomla! Documentation

Line 5: Line 5:


== Structure of a test ==
== Structure of a test ==
todo
The testing framework is built on the three layered testing architecture
 
1. '''Page Objects'''
  Each page on your application has a class which we call page objects, each page class will have information about the URL, fields, Text present on the page. We use the best possible selector for any field on the page
 
2. '''Step Objects'''
  Step Objects are classes which contains steps which are to be executed on the application to perform certain operations, step objects make use of page objects to perform thoose actions.
3. '''Cept Class'''
  Cept or Test, it is the main class which contains steps of execution for the tests, Cept Class will call Step Class functions which will indirectly make use of page objects to perform operations


== Running the test ==
== Running the test ==

Revision as of 18:41, 29 December 2014

Note: this page is under construction

What is Codeception?

Codeception PHP Testing Framework is designed to work just out of the box. This means its installation requires minimal steps and no external dependencies preinstalled (except PHP, of course). Only one configuration step should be taken and you are ready to test your web application from an eye of actual user.

Structure of a test

The testing framework is built on the three layered testing architecture

1. Page Objects

 Each page on your application has a class which we call page objects, each page class will have information about the URL, fields, Text present on the page. We use the best possible selector for any field on the page

2. Step Objects

 Step Objects are classes which contains steps which are to be executed on the application to perform certain operations, step objects make use of page objects to perform thoose actions.

3. Cept Class

 Cept or Test, it is the main class which contains steps of execution for the tests, Cept Class will call Step Class functions which will indirectly make use of page objects to perform operations

Running the test

Activating the debug mode

To activate the debug mode in Codeception just add the parameter --debug when you run the tests:

php codecept.phar run acceptance --debug  1stInstallTestCept.php