-
Failed to respond to incoming message using data source row correlation
I have a request i.e. "crn":"234567890123456","amount":"200","settlementDate":"20091224", and a responder using a data source correlation of several response. And the response is to send the responseCode by validating the "amount" [<250] or [>250]. When I send a request via a Parasoft Virtualize .pva file the event…
-
how to validate data via xpath in json assertor
I have json data in below format and i want to verify that for perticluar source id"67678" amount is -100. i tried to give below path using json asserort and tried converting json to xml and use xpath but that did not work. /root/item/Ancillary[Id/string()="67678"]/Transaction/detail/Amount { "Type": "Mas", "Date":…
-
How to validate uniqueness of a field value in the JSON response.
Hello everyone, Can someone help me how to validate a field, if the value returned in response in unique and contains no duplication. E,g: In below JSON, id field occurs multiple times, I want to validate "id" is unique and it's not duplicated in the JSON response. { "merchantCategories": [{ "id": "0001", "description":…
-
How can I add value assertions for my JSON payload that has root element
I've simplified my actual JSON response from my traffic viewer to make this example easier. Let's say I want to add assertions to validate that the first number returned is 111 and the second number is 222 (they are strings). I added a JSON Assertor but the only element that shows up is "root", so I tried manually editing…
-
Increase integer range in SOATest
While performing JSON Schema Validation in the SOATest tool through "JSON Validator" feature, I am encountering the following error: com.fasterxml.jackson.databind.node.jsonNodefactory.numberNode(Ljava/math/BigInteger;)Lcom/fasterxml/jackson/databind/node/NumericNode; In the root cause analysis, I found that in the JSON…
-
Conditionally extract json response using Extension tool
I want to extract content for all titles having Red color from given Json response so I can send it in next Request. eg. response:- { "titles":[ { "name": "T1", "color": "Red" }, { "name": "T2", "color": "Green" }, { "name": "T2", "color": "Red" } ], "content":[ "T1": "Some description 1", "T2": "Some description 2", "T3":…
-
Building a dynamic JSON Request body with n objects in an array
Hello, I have a use case that I'm trying to implement in SOATest and am running into a wall. I have a Service1 that returns n number of Account objects. There are a varying amount of accounts that could be returned for a given request as that user may have more or less accounts than another. I have a second service,…
-
Correlation / Extract Element Regardless of Order in the Request
Is it possible to do a responder correlation based on a particular element and its value, regardless of its position in the Request body? The case I am working with is where the user sends a request with the same elements, however the order randomizes each time. For example, if I am checking for the value of "Status" which…
-
Conditional Assertion not working with Has content
Trying to use condition assertion, where If (tag has content) then (assert this value). But for some reason, Has content doesn't work. The test cases passes even though the assertion value is wrong. Has content as a separate condition works fine. But only if I put it has a if condition, there seems to be some problem. Not…
-
Json schema validation
Do you have any feature to validate the json schema?
-
Xpath - Extract element based on other element in the JSON response
I have a JSON response with following structure which is dynamic. I want to extract the account balance to a data bank of specific person eg:John "Details" : [ { "AccountBalance" : "6793", "Person" : "John" }, { "AccountBalance" : "3646", "Person" : "Peter"
-
Creating data.json for java project
Hi, I worked your example project demo which was java project. It included "demo.data.json" file. I did static analysis with using this "demo.data.json" file. I am trying to analyse my java project with Jtest static analysis and I need myproject data.json file. I don't know How can create "myproject.data.json" file. Could…
-
Saving Dynamic JSON output in CSV in Columns
hi is there any way to save complete dynamic JSON output in csv in columns . right now i used write file and saved in CSV but it is saving in one row. my expectation is to save all json values in csv with 2 columns , field name and field value. i cant use data bank because json file is dynamic, one file might have 10 field…
-
Cant get JSON response from Rest request
I have a client who is unable to have their JSON request return a JSON formatted response, rather, it responds in XML format. They have provided the appropriate header listed out in: https://docs.parasoft.com/display/SOAVIRT9106CTP312/Testing+RESTful+Services+1 However, it is no working properly. Could they be missing…
-
Pass virtual assets ID? into the URL path
So I have this JSON responder... The Input Mode is Multuple Responses and each of these has been giving a name matching what should be set in the URL so for instance; List of Multiple Responses; foo1 foo2 foo3 url example; server01..parasoft.local/data/layer/foo1/map So in my application if url directs to ;…
-
Extract the values from Payload request and use in Webpage to display records
Dear Experts I am newbie to SOA test. and my requirement(s) are below with Rest Service and SFTP Scenario1: 1) Run a POST method with JSON payload.in Request. Here response will be empty only 204 No content status code appears 2) Automatically launch a web page, and records should display, by automatically taking the…
-
Send SOAP Calls via Virtualize
Hi Everyone, I need to simulate the following scenario: Step 1: Virtualize receives a REST Request that requests for status Step 2: Virtualize needs to send 3 different SOAP Calls to a webservice hosted on it Step 3: Virtualize responds back to REST Request received on Step 1 with statuses from Step2 I am currently unsure…
-
Combine two fields of SOAP response to One
I would like to combine two fields values of same SOAP response into One. So that I can assert the One filed of SOAP to REST response field. SOAP Response: Field 1 = date Field 2 = Time Combine SOAP field (1 &2) to Field 3. Assert SOAP Field 3 to REST response field. How should I do this?
-
JSON REST API: Validate multiple responses against a DataSource
Hi All, I am trying to validate the JSON response against an Excel sheet for each INPUT value passed. I am using the JSON assertor and for each attribute have assigned the corresponding column name of the Excel. But, for the attributes where it is a ARRAY/LIST or TABLE of values it is failed saying no value found. SAMPLE…
-
Lightweight Scripting of Datetime Fields in JSON Responder
Is there a simple way to programmatically alter certain values in an otherwise static JSON response payload with Virtualize? For example, let's say I've defined something like the following as a literal response in a JSON Message Responder: { "foo": "some static value for foo", "timestamp": "1970-01-01T00:00:00Z"} I'd like…
-
How to Send PDF file in a request field using Parasoft SOA test tool
Hello, I am trying to send a PDF file in one of the request field(fileContent). tool : Parasoft SOA test 9.9 { "fileMetadata" : "sfdsf", "fileName" : "dsdfsd", "fileContent" : "" } note that I am not just sending PDF file in the req, I also have to send some more fields along with the PDF file in the req. it;s just in one…
-
JSON - Details from Body
Hi, I would like to extract some values from a JSON payload using JSON Databank. I was able to use a sample request and was able to extract Xpath with no errors. However when i send a request from SOA the same template used for JSON Databank i am getting an error. below is the sample request i am sending. I am trying to…
-
Virtualize JSON Responder - GET. How to Get Details?
Hi Everyone, I need to create a responder to accomodate a GET Rest request sample below: GET /path/{safsadfsadgsadfgsaf}/status HTTP/1.1Accept: application/jsonUser-Agent: ApplicationName/1.0 (env=test; user=testername)X-Request-ID: 123124asdfasdfasdf1124 How do i get the detail that's between {}? as this is changing every…
-
Compare a set of elements of the JSON response to the standard set of elements
I have a JSON reponse with 152 currency codes fields. I need to compare the whole set of currency codes in the response with the standard set of codes. The issue is the currency codes in the JSON response are dynamic and they do not have a order, if they would have I would have added a string comparison and mapped to my…
-
Retrieval date format
Is there a way to validate the retrieval date format: yyyy-MM-dd'T'HH:mm:ssZ – Ex. 2017-06-26T01:00:
-
I want to add the amount and assert the total to a value
Hello, SOA test : 9.9.5 I have an API where the response will be the clients accounts details like(accounts name, Category, amount and etc). I want to add all the different accounts "amount" and assert the same with the "total balance" field. please advise. Thank you. regards, Neil
-
How to assert the length of the field.
Hello, In SOA test 9.9 . Is there any specific assertion to validate the length of fields coming in response? e.g: I want to apply and assertion below field should be always 16 digits: 123456874874834 Regards, Neil