Asserting NULL values
I'm doing comparison of values in Oracle database on one end and the service at the other. There are attributes which return NULL value and those same attributes are not found in the service response when this is the case. I need an assertion in the REST request that will pass this scenario, but the regular assertions do not work. When I try to assert these, I get the following error: Comparison failed. Path: [$['list'][0]['firstLevelNode'][0]['attributeName']]; Expected value: []; Actual value: []. Expected value is the attribute from the JDBC Request and the Actual value is the corresponding attribute from the REST request. As you can see, the responses are the same, but the assertion does not pass. Is there a way to bypass this? Thanks. EDIT: I know this can be done with a Groovy script, but I would really prefer a solution with assertions inside the REST request.1.8KViews0likes5CommentsMessage Content Assertion: Assertion is looking for null fields even though it worked previously
When I run my call I get the following JSON object: { "data": { "id": 159, "zoneName": "NameofZone", "createdAt": "2019-09-11 19:25:31", "updatedAt": "2019-09-11 19:25:31", "groupsId": null }, "status": "success", "code": "200", "message": "Operation success", "version": "2" } I setup a Content Assertion on the response to validate that the fields exist: I can run this call any number of times back to back and the message content assertion will always pass. However, when I run the entire Test Suite and the same step is run the message content assertion will always fail. It will give an error as if it were trying to find null nodes in the response (shown below) Any idea or insight into why this is happening? Is there any way to prevent this? Currently I am removing the contract assertion from the test case but that kind of defeats the purpose of the test.Solved3.3KViews0likes12CommentsWhen doing an assert on a large response (10,000-50,000 lines) SoapUI is taking a long time 5+mins.
I have a response that is anywhere between 10,000 and 50,000 lines. I have a few asserts that check the uniqueness of those values. I understand this will take some time, but is there anyway to designate more resources to SoapUI so that these don't take forever? I've had a 46,000 line that takes almost 15min to process one assert! I am on the latest release of SoapUI. I've also played with the testrunner.bat and ready-api.bat filesandun-remmed the line and upped the value for: set READY_XMX=16000m along with Xms512m Appreciate any help in this matter!Solved2.9KViews0likes9CommentsUsing multiple * wildcard in an xpath assertion throws NPE
Hi, I'm currently creating an assertion for an xpath result that contain multiple dates. And so I have: <created>*</created> <updated>*</updated> <updater>opencell.admin</updater> Which fails, but: <created>*</created> <updated>2018-04-17T09:14:18.190+08:00</updated> <updater>opencell.admin</updater> Succeed. Error I got was: XPathContains assertion failed for path [//return[1]/xxx/yyy[@code="zzz"]] : NullPointerException:null Seems like multiple instance of * wildcard doesn't work? Is there a workaround?696Views0likes0CommentsCopy assertion
Dear community members, I would like to know how can I copy assertions from 1 test case to another, such that the referred expected values are also updated accordingly. Here is my scenario: Test Case 1: contains DataSet1, RestRequest1, Assertion1 Test Case 2: contains DataSet2, RestRequest2 .... and so on... upto Test Case 60: contains DataSet60, RestRequest60 The Assertion1 (of test case 1) is a Message content assertion and its expected value is referred as ${DataSet1#out_value}. My intention is to copy assertion1 to the other 59 test cases. But when I copy assertion 1 to TestCase n, the copied assertion is still referring to ${DataSet1#out_value}. And then I have to manually modify each copied assertion to DataSet n. Is there a mechanism where when I copy assertion to testCase n, it automatically refers to ${DataSet n#out_value}. Thanks in advance.1.3KViews0likes3CommentsAssertions with XPATH
Sorry if this is in wrong area, but I am new to SOAP UI os. I am currently trying to achieve a simple test case where if I call a service with no parameters, the response should not provide me any information back. Super simple. With that, I am trying to get an understanding of xpath assertions. I used xpath in selenium tests. But I do not understand what I am doing wrong on the Xpath match configuration screen. I see that when IclickDeclare, it provides me namespaces in XPath Expression box. It provides this: declare namespace soap='http://www.w3.org/2003/05/soap-envelope'; declare namespace ns1='https://ForceDevelopmentServices.ServiceCode.DCPDS.EducationData.DataContracts'; declare namespace ns2='http://schemas.microsoft.com/2003/10/Serialization/'; declare namespace ns3='http://tempuri.org/'; declare namespace ns4='https://USAF.A1.Personnel.ForceDevelopment.DAL.Services.Base'; Under Assertions, I used a online xpath tester http://www.freeformatter.com/xpath-tester.html#ad-output to get this xpath expression: //for1:SSAN/text() I would expect to place a ? in the expected results box, but when I click on Select from current I get an error message saying "Missing content to select from". I then tried to click on the 'Test' to see what happens, I get another error message saying "Missing Content" I looked over Query/Match, I did not get much from this view since it does not seem to do anything when I put in xpath query or Matching Value Any assistance would be greatly appreciated. Thanks in advance. alex <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:for="https://ForceDevelopmentServices.ServiceCode.DCPDS.EducationData.Interfaces" xmlns:for1="https://ForceDevelopmentServices.ServiceCode.DCPDS.EducationData.DataContracts"> <soap:Header/> <soap:Body> <for:GetAcquisitionsCertificationsBySSANResponse> <!--Optional:--> <for:GetAcquisitionsCertificationsBySSANResult> <!--Zero or more repetitions:--> <for1:DCPDSAcquisitionsCertification> <!--Optional:--> <for1:SSAN>?</for1:SSAN> <!--Optional:--> <for1:ACQ_DT_CAREER_LVL_ACHVD>?</for1:ACQ_DT_CAREER_LVL_ACHVD> <!--Optional:--> <for1:ACQ_CAREER_LEVEL_ACHVD_DESC>?</for1:ACQ_CAREER_LEVEL_ACHVD_DESC> <!--Optional:--> <for1:ACQ_CAREER_LVL_APPR_AUTH>?</for1:ACQ_CAREER_LVL_APPR_AUTH> <!--Optional:--> <for1:ACQ_CAREER_LVL_APPR_AUTH_DESC>?</for1:ACQ_CAREER_LVL_APPR_AUTH_DESC> <!--Optional:--> <for1:ACQ_CERT_CAREER_FIELD>?</for1:ACQ_CERT_CAREER_FIELD> <!--Optional:--> <for1:ACQ_CERT_CAREER_FIELD_DESC>?</for1:ACQ_CERT_CAREER_FIELD_DESC> </for1:DCPDSAcquisitionsCertification> </for:GetAcquisitionsCertificationsBySSANResult> </for:GetAcquisitionsCertificationsBySSANResponse> </soap:Body> </soap:Envelope>3.8KViews0likes4CommentsUnable to add assertion
Hi, with a very simple project, I am trying to add assertions to my SOAP requests. When I clicked on the + icon, the dialog opens, but all is shown is Contains. All the others types are missing. Also, I cannot select any option on the left. Working with SoapUI 5.2.1 on Win 7 64. Logs files attached. Anyone can help me on this? Thanks4.8KViews0likes19CommentsHow to apply common assertions at Project or Suite Level
Hi, I have a test suite in soapUi which has many test cases . And each test cases contains multiple REST requests tests steps as well. I would like to add assertions for all of those requests test steps , but I don’t want to add common types of assertions at each and every request level. Say for example I want to add assertions for http response status code . This assertion is going to be a common one and it should be checked for all the requests . Adding this common assertion for each and every test step is going to be a manual effort , and looking for a better approach. Instead of adding this at every request level, is it possible to add at test suite / test case level or some other way, so when the execution of suite happens , this gets checked for all the requests. I use free version of soapUI Thanks & Warm Regards MusaffirSolved2.1KViews0likes1Comment