ContributionsMost RecentMost LikesSolutionsRe: License key renewal issue We figured out where the problem was, there's a network issue, the license was registered successfully on your server but didn't save correctly on some of colleagues' machine, anyway, we are ok now Thanks again Jerry Re: License key renewal issue Here's the details We used to use SoapUI Pro 5.1.2 before, when we started to use Ready!API1.5.0 about 4 months ago, it used our SoapUI Pro5.1.2's license and everything worked fine, last week our SoapUI Pro5.1.2's licenses expired and our company renewed licenses with SoapUI, today we started renewal process, some guys updated the license directly in Ready!API1.5.0 and were successful, they don't have any further issue, others UNINSTALLED SoapUI Pro 5.1.2 and UNINSTALLED Ready!API1.5.0, and then reinstalled Ready!API1.5.0 and applied license,they got successful in updating license but when they closed the window and reopened it, it prompted again for activating new license Do you think uninstall and reinstall would cause this issue please? Thanks again Jerry License key renewal issue Sorry to bother, our group used to use SoapUI Pro 5.1.2 and we decided to use Ready!API1.5.0, we've got the new license keys from you and applied, all license keys worked fine, however, some guys have an issue that after they close the Ready!API1.5.0 and reopen it, it pops again asking for reactivating license key, we follow the same renewal procedure and we don't know why we have different result, do you have any solution for the reactivating issue please? Thanks again for help Jerry SolvedRe: How to assert on condition of another assertion please? Yes, I also defined such a property with the same name Thanks again Jerry Re: How to assert on condition of another assertion please? Hi Justin, Thanks a lot for the advice, I gave it a try andI have2 questions please Here's my code ---------------------------- import com.eviware.soapui.support.XmlHolder def holder = new XmlHolder( messageExchange.responseContentAsXml ) holder.namespaces["NDW"] = "http://..." holder.namespaces["NDS"] = "http://..." def node = holder.getDomNode( "//NDW:mu14Response[1]/NDW:QualityGuidelineList[1]/NDS:QualityGuideline[1]/NDS:sourceAssertedID[1]" ) // check if eligible def resp_compliance = holder.getNodeValue( "//NDW:mu14Response[1]/NDW:QualityGuidelineList[1]/NDS:QualityGuideline[1]/NDS:isCompliant[1]" ) // get isCompliant true or false in the response def datasource_compliance = testRunner.testCase.getTestStepByName("DataSource").getPropertyValue("isCompliant") // get isCompliant true or false from the data source if (node != null) // if eligible, the node exists { if (comp == compliance) // if isCompliant in response is the same as in the data source { log.info "pass"} else (log.info "fail") } 1) It didn't recognize Porperty "isCompliant" in data source, so for def datasource_compliance = testRunner.testCase.getTestStepByName("DataSource").getPropertyValue("isCompliant") do I need to give the project name, test case name or test step name as well please? 2) "if" works, but "if ... else..." doesn't, does it suport if else or is my syntax wrong please? Thanks again for help and have a wonderful Happy New Year! Jerry How to assert on condition of another assertion please? I'm testing a simple medical rule: children of 2 years old should have MMR vaccine done 1) if a child is not 2 years old, he is not eligible 2) if a child is 2 years old, he is eligible for vaccine, and if he has done, then he is compliant, otherwise he's not compliant I'm using data driven testing, the spreadsheet has patients' age and vaccine date (if he's done) like below Header: Age VaccineDate isEligible isComplaint 2 01/01/2015 true true 1 null false null 2 null true false If a patient is eligible, the xml response returns patientID If a patient is NOT eligible, the xml response returns nothing If a patient is eligible, the xml response also returns <compliance>true</compliance>, or <compliance>false</compliance> For Eligibility I do xPath Assertion, in "xPath Expression" I have declare namespace NDS='http://....; exists( //NDS:QualityGuideline/NDS:patientID) for "Expected Result" I have ${DataSource#isEligible} So if a patient is eligible, the node of patientID exists, "exists( //NDS:QualityGuideline/NDS:patientID)" is true and it fits "isEligible" (true) in the datasource, if a patient is NOT eligible, the node of patientID doesn't exist, "exists( //NDS:QualityGuideline/NDS:patientID)" is false, it fits "isEligible" (false) in the datasource For Compliance I do xPath Assertion, in "xPath Expression" I have declare namespace NDS='http://....; //NDS:QualityGuideline/NDS:compliance for "Expected Result" I have ${DataSource#isCompliant} So if a patient is compliant, I have the response <compliance>true</compliance>, it fits "isCompliant" (true) in the datasource, if a patient is NOT compliant, the response <compliance>false</compliance> fits "isCompliant" (false) in the datasource The assertion on eligibility works perfectly, but the assertion on compliance only works when a patient is eligible, when a patient is not eligible, there's no response for compliance and it generates an error of "<compliance> doesn't exist" In order to fix this, I'd like to add a condition for assertion on compliance so it only works when a patient is eligible (which means the node of <patientID> exists in the response), something like: import com.eviware.soapui.support.XmlHolder def holder = new XmlHolder( messageExchange.responseContentAsXml ) holder.namespaces["NDS"] = "http://..." def node = holder.getDomNode( "//NDS:QualityGuideline/patientID") if node != null // if the node for <patientID> exists in the response, the patient is eligible, then assert compliance {//NDS:QualityGuideline/NDS:compliance = ${DataSource#isCompliant} } Of course the last line doesn't work, because it's xPath assertion not script assertion, so my question is, how do I write assertion on compliance with the condition that it only asserts when patient is eligible (if not eligible it won't assert) I don't mind using script or xPath assertion or combination, as long as it works Thanks a lot for help Jerry Re: How to associate the response with the expected result (in data source) please? Thanks a lot for the great help! Jerry How to associate the response with the expected result (in data source) please? I'm testing a simple medical rule, basically this rule requires a patient to visit his/her doctorfor the second time AFTERhe/she finishes the prescription medicine, for example: 1) Today the patient visited the doctor again, if the prescription date was 10 days ago and the amount is 7 (1 med per day), then today the patient already finished the medicine, so the patient is compliant 2) Today the patient visited the doctor again, if the prescription date was 10 days ago and the amount is14 (1 med per day), then today the patient still has 4medicine, so the patient is notcompliant So my data source shows "prescription_date" and "prescription_amount" (data driven testing), the run date is today, theengineprocessestheabove situation and if the patient is compliant, it displays in the response: isCompliant = true, otherwise it shows isCompliant = false When we test this rule as a black box, we give only "prescription_date" and "prescription_amount" in spreadsheet or in database, the element "isCompliant" is only displayed in the response after engine processes the request,theelement "isCompliant" isnot in the request. If possible, we'd like to add the expected result (maybe in data source) to compare with actual result of isComplaintin order to validate if the rule is processed correctly, the question is, how do we associate them please? As properties? Or assertion? Or through script? Suppose we have the data sourcebelow (today is Dec.15, 2015, 10 days ago was Dec. 5, 2015) prescription_date prescription_amount (expected_result) -- I use ( ) because I'm not sure if it's practical 12/05/2015 7(true) 12/05/2015 10(false) prescription_date and prescription_amount will be passed to request as properties, but how do we associate the "expected_result" with the actual result "isCompliant" in the response please? Or how do we assert on isCompliant in the response to associate with the expected_result in the data source or elsewhere please? I'm open to all your possible solution or recommendation. Thanks again for help Jerry SolvedRe: A question on assertion please I'm sorry if I confused you, I'll put it in a simple way I'd like to test a rule with Excel spreadsheet or Oracle database as data source (patients' DOBs), this rule only takes DOB as input and outputs either the ruleID (if eligible)or nothing (if not eligible) in the response, the question is, how do I assert on a missing node (for non eligible situation) please?I did find an example on how to assert on null value in this forum though, wonder if you could shed some light on missing node please Thanks again Jerry Re: A question on assertion please Thanks a lot for your reply, yes, I used your code in calculating dates and it worked perfectly. At first, I was expecting some element for eligibility in the response so I could easily add assertion but our developers coded in a different way, when eligible the response displays the ruleID; when not eligible the response doesn't display ruleID, so I consider the existence of the node like: import com.eviware.soapui.support.XmlHolder def holder = new XmlHolder( messageExchange.responseContentAsXml ) holder.namespaces["NDS"] = "XXXXXX" def node = holder.getDomNode(for ruleID) assert node != null But then the problem is, if I do "assert node != null", all test steps for non-eligible status will fail, we actually don't want them fail, we want them pass but with some indication that the patient is not eligible, so we'd like to use a variable or something to hold the status of eligibility (or ruleID since it only displaysif eligible). My plan is that I give a DOB and a value for statusin the data source,when I runa test step, if there's the ruleID in the response, or such a node, the status is true, then compares with the value in the data source, if they are the same, the test step passes, for example: Igive "DOB1, true" in data source, here DOB1 is older than 2 yrs old, the response displays ruleID, maybe a script seta status varaible to be true, then compares with the "true" in the data source, since they are the same, the test step passes. IfIgive "DOB2, false" in data source, here DOB2 is less than 2 yrs old, theresponse doesn't display the ruleID, the node is missing, so the script setstatus to be false, then compares with the "false" in the data source, since they are the same, the test step passes, a test step should only fail when its outputstatus is different from the status in the data source, which means either the rule calculates wrong, or our logic is wrong (typical for negation test) Please keep in mind, we test a rule as black box, we can only conclude based on the output (response), since the response doesn't display anythingif not eligible (except a missing node), that makes the assertion difficult, also, this is a bit out of assertion aspect, do you have any suggestion or recommendation in coding this kind of script please? Thanks a lot Jerry