TikiTests

This feature allows the user to record a web session and to replay it. On replay the pages will be compared to see if some changes occurred in between.

How to use Feature

Enable the Feature:
Settings > Control Panels > Features > Page > Admin features > TikiTests

After enabling the feature you need to affect permission to use the TikiTests to groups of users.

  • Minimum PHP5 required.
  • PHP module tidy needed: You will need the tidy module for PHP to validate the HTML and to detect Validation errors. If you don't have the php tidy module installed TikiTests falls back to using HTMLPurifier to clean the HTML, but the validation errors and warning will not be available.
  • Need PECL http or PHP cURL extension for replay functionality. Recording can be done without these. Test for HTTP extension is done before cURL test.

Image


Requirement : you need PHP5 ! I will try to make it work for php4 but it is not very high on my list.

Permissions

Permission Description
tiki_p_admin_tikitests Allow to Administer the TikiTests
tiki_p_edit_tikitests Allow to Edit TikiTests
tiki_p_play_tikitests Allow to Replay TikiTests

Module


You can have quick links to TikiTests by adding the tikitests module to your modules list. Go to the Modules admin page and add it. This will allow you to see links to list tests, or to create new test.

Recording a Test


If you have added the TikiTests module to your side/top bar then click on the link 'Create a TikiTest', else go to tiki_tests/tiki-tests_record.php.

You have to enter the name of the test, it is the name of the XML file that will hold all the recorded informations. This file will be in tiki_tests/tests/<the_name_you_entered>.xml.

You can check the checkbox 'Use Current Session' if you don't want that TikiTest log you out before the recording starts. If you don't check the box you will logout and you will record a full session with login and navigation.

Once you press the button 'Start Recording the Test' you will see a top bar that allows you to :

  • pause the test, so you can navigate without recording
  • resume the test if you have paused it
  • stop the test and go to the Edit page. Once on this page the recording stops

Image


You can see the list of tests created with 'tiki-tests_list.php' :

Image

Edit a TikiTest

To edit a TikiTest go to the TikiTests list and select 'Edit'.

Image
Image


You will see all the URL recorded, you will be able to :

  • edit the options of the test :
    • Summary mode : display only success or failure of the test
    • Show Page Differences : show the difference in HTML code using HTMLDiff
    • Show Tidy Errors and Warnings : show the warning and error in HTML validation
    • Show POST Data : shows the data in the post section
    • Use Current Session/Logout : Use the current session for recording/replay instead of logging out first
  • edit the Xpath Expression to compare the recorded and replayed content, you will be able to see what is compared be clicking on 'Test Xpath Expression'

Xpath expression


To have a full xpath syntax reference please consult the page http://www.w3.org/TR/xpath on the W3C web site.

As an example :

Copy to clipboard
//div[@id='tiki-center']
select all the div from the page where the attribute 'id' is equal to 'tiki-center'

Replay a TikiTest


To Replay a TikiTest go to the TikiTests list and select replay.

You will have the chance to modify the options of the tests :

  • Summary mode : display only success or failure of the test
  • Show Page Differences : show the difference in HTML code using HTMLDiff
  • Show Tidy Errors and Warnings : show the warning and error in HTML validation
  • Show POST Data : shows the data in the post section
  • Use Current Session/Logout : Use the current session for recording/replay instead of logging out first


Then Click on 'Replay', wait for the test to be done.

At the end you will be presented with the results of the test URL by URL.

Do you know how to improve this page?

Help us to improve the All the Documentation. Edit this page after you've read the Welcome Authors guidelines.

Developer Notes

This feature is in early development stage. It works for me, but bugs may be here !
Please report bugs or add developer notes at http://dev.tiki.org/TikiTests

Developers Contact

Stéphane Casset <sept@logidee.com>