Test Tools

From Contensive Wiki
Jump to: navigation, search

The collection creates a box at the bottom of the public site with links to automatically log anyone in who is in the Test Users group. Use this collection on development and staging sites to aid loggin in and logging out as various roles.

Terms

Roles

Test Users 
You are a test user if your person record is in the Test Users Group. Test users are listed at the bottom on the pubic page with links that automatically log them in.

How-To

How to enable the test tool panel on a site

NEVER install or enable this addon on a production site. When test tools is installed, the tool panel displays at the bottom of all public pages. To enable the tool panel, enter the password. The password is stored in a test file called TestToolPassword.txt in the config folder of the Contensive installation.

Add a test to the test tool panel

Write any addon and add a record to the Tool Panel Tests content, located under the Test Tools collection on the admin navigator. An example of a simple Active script (vbs) addon follows.

  1. Create an addon record and give it the name "My First Tool Panel Test Addon"
  2. Add the VBS code that follows to the Active Script tab, code field and save
  3. Open "Tool Panel Tests" under the "Test Tools" collection, add new record and give it the name "My First Tool Panel Test". Select the addon you just created and click OK.

The new test now appears on the Tool Panel. click it and your vbs test will run on the site.

function test
	dim runFromToolPanel
	runFromToolPanel = cp.doc.getBoolean( "runFromToolPanel" )
	if not runFromToolPanel then
		test = "ERROR, This addon can only be run from the Tool Panel"
	else
		'
		' write a test here that returns OK, or ERROR
		'
		test = "OK"
	end if
end function

Reference

Test Cases

Revision History