The K Test Client Actions Core library provides a framework for configuring and running automated unit tests on client actions. There is also a block, TestResultsBlock, for displaying results of client action unit tests.
Use the K Test Manager forge component to provide a user interface to the manage test scripts and review results.
The forge components are separated as your code will depend on this component, whereas the K Test Manager only needs to be deployed to the dev environment.
First write a client test script. Then write test cases to verify client actions in multiple scenarios.
How to Write a Client Test Script
The test script runs all the test cases for the script (see below for writing a test case).
To write a test script
Create a page to run the test script, eg "RunTests"
Write as many test cases as you need. This is your test script!
Add the TestResultsBlock to your page to display the test results immediately. Otherwise view results of tests in the K Test Manager.
How to Write a Client Test Case
The test case verifies a particular "target", normally a client action, for a particular scenario.
To write a test case
Create an action naming it with the target and scenario.
For example, testing an action ProcessStructure with large data values call the test Test_ProcessStructure_WithLargeData
Have a look at the demo app KTestClientActionsDemo to see an example of client unit tests. Notice it has a pattern for creating a unit test template for testing a particular client action. This pattern helps writing unit tests quickly for differing scenarios.
The K Test Client Actions Core library provides a framework for configuring and running automated unit tests on client actions.
Write as many test cases as you need. This is your test script.