Testing: SysTest & Task Recorder
Create unit tests with SysTest, run them in Test Explorer, and record business processes with Task Recorder.
Testing: SysTest & Task Recorder
SysTest is your safety net, Task Recorder is your video camera. SysTest writes self-running checklists (βcreate customer β did it save?β). Task Recorder captures UI clicks into documentation or automated test cases via RSAT.
SysTest Framework
[SysTestTargetAttribute(classStr(CustomerValidator), MethodStr(CustomerValidator, validate))]
public class CustomerValidatorTest extends SysTestCase
{
public void setUp() { super(); }
public void tearDown() { super(); }
[SysTestMethodAttribute]
public void testValidExistingCustomer()
{
CustomerValidator v = CustomerValidator::construct("1001");
this.assertTrue(v.validate(), "Should pass for existing customer");
}
[SysTestMethodAttribute]
public void testInvalidCustomer()
{
CustomerValidator v = CustomerValidator::construct("FAKE999");
this.assertFalse(v.validate(), "Should fail for non-existent");
}
}
Assert methods
| Method | Purpose |
|---|---|
assertTrue | Value should be true |
assertFalse | Value should be false |
assertEquals | Two values equal |
assertNotNull | Not null/empty |
Transaction modes
Default: test runs in a transaction that auto-rolls back β test data disappears. Use SysTestTransaction::NotInTransaction for integration tests that need persistent data.
π Sophie: βCarl made me write tests first. When my CoC broke form validation, the unit test caught it instantly.β
Exam tip: SysTestTransaction
Default mode rolls back. NotInTransaction persists data. The exam asks which mode for which scenario.
Running in Test Explorer
- Build project β tests auto-discovered
- Test menu β Test Explorer
- Run All or select specific tests
- Green = pass, red = fail with details
ποΈ Vik: βWe run SysTest in our Azure DevOps pipeline. Every check-in triggers build + test. Failed tests block the check-in.β
Task Recorder
Records user actions to generate documentation and test artifacts.
| Output | Purpose |
|---|---|
| Step-by-step Word doc | Training documentation |
| BPM recording | Upload to LCS Business Process Modeler |
| XML recording | RSAT automation |
| Task guide | In-app help |
RSAT (Regression Suite Automation Tool)
Converts Task Recorder XML into automated end-to-end tests. Business analysts record, RSAT replays against test environments.
| SysTest | Task Recorder/RSAT | |
|---|---|---|
| Level | Unit β methods and classes | End-to-end β business processes |
| Author | Developers in X++ | Business analysts in UI |
| Speed | Seconds | Minutes (simulates clicks) |
| Data cleanup | Auto-rollback | Requires test data management |
| Best for | Code validation | Business process regression |
Vik needs to test his CoC extension on validateField. Approach?
Tests should clean up automatically. Which mode?
Business team wants regression tests after upgrade. Not developers. Tool?
Next up: Domain 5 β Reporting in F&O β SSRS, Power BI, Excel, and Electronic Reporting.