Test Tools

From Contensive Wiki
Revision as of 16:35, 24 March 2016 by Admin (Talk | contribs) (Add a test to the test tool panel)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.



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 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"
		' write a test here that returns OK, or ERROR
		test = "OK"
	end if
end function


Test Cases

Revision History