Thanks a lot to take a look at my post, please find the following example
------ Request -----
<NDS:patientID>1</NDS:patientID>
<NDS:dateOfBirth>2013-01-01</NDS:dateOfBirth>
<NDS:ruleID>123</NDS:ruleID>
<NDS:ruleDesc>MMR Vaccine</NDS:ruleDesc>
<NDS:runDate>now()</NDS:runDate>
---- Response (Eligible) ----
<NDS:ruleID>123</NDS:ruleID>
<NDS:ruleDesc>MMR Vaccine</NDS:ruleDesc>
<NDS:patientAge>2 years 11 months</NDS:patientAge>
<NDS:matchClassName>Age</NDS:matchClassName>
<NDS:status>0</NDS:status>
<NDS:sessionID>D3236B42A5DCF03A</NDS:sessionID>
If DOB in request = 2014-01-01, then the non eligible response would be:
<NDS:status>0</NDS:status>
<NDS:sessionID>D3236B42A5DCF03A</NDS:sessionID>
I use Excel spreadsheet or Oracle JDBC connection as data source, running test is no problem at all, but the question is how I could do the assertion to associate with the preset value in the source for eligibility, for example, today is Dec. 11, 2015, a tester can set the following values in the spreadsheet to validate if this rule works correctly
DOB RuleID isEligible <--- Header in the spreadsheet
2013-12-11 123 true <--- test step 1: the child is 2 years old, he/she is eligible
2013-12-12 123 false <--- test step 2: the child is NOT 2 years old, he/she is not eligible
2013-12-11 123 false <--- test step 3: the child is 2 years old and is eligible, but the value is false for eligibility, so this test step should fail
For test step 1, the child is 2 years old and is eligible, the node "<NDS:ruleID>123</NDS:ruleID>" is displayed in the response, and since the presetting of "isEligible" in the spreadsheet is "true" and fits the eligible response, so this test step should pass
For test step 2, the child is not 2 years old and is not eligible, the node "<NDS:ruleID>123</NDS:ruleID>" is not displayed in the response, since the value for eligibiliety is "false" and fits the non eligible response, so this test step should also pass
For test step 3, the child is 2 years old and is eligible, but the value is "false" and doesn't fit its eligible response, so this test step should fail
Basically the DOB data is the only one I need for testing, the rest are for eligibility so they really don't matter if, how or what to be in the data source, as long as the logic works.
I try to find a practical way to do assertion on eligibility
Thanks a lot for help
Jerry