- 1 Posts
- 13 Views
Poeplesoft Test Framework Tools 8.59.01
I want to write a test case to validate a Peoplecode I wrote (End Date cannot be less than Start Date). I have a SaveEdit peoplecode that displays a ERROR message when End Date is less than Start Date.
I am trying to write a Test Case to capture a situation where the validation peoplecode that I wrote does not fire (for whatever the reason may be) and as a result invalid data gets stored in database. One scenario this could happen is if the validation peoplecode does not make it to test environment during migration.
I tried different ways in PTF to make this work with no success (I am still learning how to use PTF). I believe inherent Message Recognition feature of PTF is interfering with what I am trying to do.
Would appreciate if anyone can guide me on how to go about developing this test case.
Here is what I have done so far.
Test Case 1
During Recording Phase....
Message Recognition ON during Recording.
Entered End Date < Start Date
I hit Save button
Validation peoplecode fires and error message is displayd. I press OK and message box is closed. I stop recording.
Message Recognition captures the displayed message and is stored in the Test Case
During Execution Phase .....
I execute the Test Case 1
Validation peoplecode fires and Message Box is displayed.
Message Recognition handles error message and Test result is flagged as success.
Thats all well and good. Now suppose the validation peoplecode did not make it to test environment during migration and I run the above Test Case in Test environment, the test would still end up as success because no validation is done and invalid data can get into the database.
How would I write a test case to detect such situation and flag an error so that migration error can be identified and fixed.