-
How to call 1 of the SOAP Request Parameter in Groovy Script
Hi Team, I am trying to perform the Custom Assertion by using below code with Extension tool by keeping it as a separate Teststep import com.parasoft.api.*; public class Comparison { //Compares a value from a database data source to a value returned in a SOAP response public boolean compareToDatabase(Object input,…
-
Internal Assertion report generation
Hi team, While implementing internal Assertion I am unable to see it's validations are pass or fail.Can you help me out how to generate a test report in which the internal Assertion validations should be captured
-
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":…
-
Compare datasource(expected data) with actual data in the database
Hi Parasofters, I have a problem. I am putting data in a database(SQL developer) via a process which loads some XMLs in the database. I have the expected data in a datasource in parasoft soatest. I want to compare the actual data in de database with the expected data in the datasource within parasoft soatest. How can I do…
-
assertion for "case sensitivity"
Hi, I have assertion for a string .. if contains Step .. it is failing when response is STEP anyway to fix case sensitivity in assertions?
-
Assertion depending on Datasource's value
Hi Team, I have added two value assertion for my test case.But I need to validate those assertion depending in the value present in my DataSource's column. eg : I have a column name SCOPE and has value IN-SCOPE and OUT-SCOPE .So if the value is IN-SCOPE I will have to use a particular assertion and if I have value for…
-
Assertion to be added to check a value present in one of the two xpaths
Hi All, If I want to add an assertion for a value but it can be present in one of the two xpaths of the response so I was thinking of adding OR assertion of the Compound assertion but it is getting failed. eg : I want to fetch an amount and the value can be either in buyer tag or seller tag.So I have added value assertion…
-
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…
-
Conditional Check for Incoming Request and Custom Response
Is it possible to set up a responder to respond multiple ways based on the incoming request format? Example: A SOAP based request sent yields type "A" response, and a REST based request yields type "B" response. The response is from the same responder If this is possible, can it be detailed as to how to do this?
-
XML Assertion for single element
Hi team, I need to validate a value say itemID (used excel datasource ) from xml response but in the response xml a no. of itemID nodes gets generated ,so I have to check with each itemID present in the response.The required itemID in response doesnot everytime generates at the same node so while selecting the element I…
-
How to validate element value with group of elements?
I am getting rest service response in below format but i want to validate element value with my predefined data sources 1 Developer 5 Tester 7 Admin i have data source which have all roles allowed in my list ( Developer,Tester) now i want to validate all the roles from response against with my data source using parasoft…
-
Reset RunId inside Dynamic Stubs
I am running Unit Testing in the following environment: Eclipse: Kepler Parasoft: 10.3.4 I am using dynamic stubs to do unit testing. I am calling the same function multiple times inside a single test case, and that function calls additional sub-functions that are stubbed. I know that I can set the Run Ids to control the…
-
DB Assertion Regardless of order
I have a test where I query a DB and returned with a list of values. I want to be able to make an assertion to check if certain values exist regardless of order or position in the result. Is this possible? So far, my team mates who are working on this as well have been unsuccessful
-
Compare values in writeable with db output
I have saved a writeable with 5 values. I have a DB tool which is used to fetch the result of SQL query . It gives me more than 50 records. Now I need to validate if that 5 records in writable is available in the 50 records of db result. Please help how to perform this validation.
-
Perform Arithmetic and Logical assertions on two writeables/tables
I have to implement the below scenario: I have to compare the DB values from 2 different tables and perform logical and arithmetic operations on them. Steps implemented: * Create a new test suite * Create a DB tool and query to fetch data (multiple columns) from a table 1. I need to save the run time values. I created a…
-
how to use an XML Data Bank and Writable Data Source to extract multiple rows of data for later use
The Goal After completing this tutorial you should have a basic understanding of how to extract multiple values into corresponding data source rows that can later be iterated over for use in subsequent test steps. The Use Case For this use case we would like to request a list of all the books on the bookstore using the…
-
JSON Date Assertion
can someone help me which assertion be used to validate Date ( it is in ISO format - 2018-01-01T12:50:00-0400 ) with <, <==, >,>== . I found these condition available for numeric value using numeric assertion but could not find for the Date.
-
How to check assertion status or test result of specific test step
Hi, Can someone please help me check the test result of specific test step.. Or result of previous test step Or result of assertion in previous test step. I can do this on SOAP UI But don't know how this works on SOATest. Thanks, Tarun
-
JSON assertion validation for status code 200.
My script reads test data from excel which also has a status code( expected result) column in it. Scripts fetches data from excel and compares it with status code to validate. Since output of my API is generated in JSON format, I am using JSON asserter to validate status code. The problem that I am facing is for a scenario…
-
Want to store data in variable fetching from XML databank in javascript for custom assertion
Want to store data in variable fetching from XML databank in javascript for custom assertion. Can you please help me? For example, In XML data bank I have extracted an element named "Date" In Custom script, I want to store this element in a variable. What should be the syntax?
-
Assertions In PVN or converting .pvn to .tst files
Hi All , Is there a way I can leverage the assertions in the .pvn response messages. I would like to automatically test and validate the virtual services. If not is there a way to convert .pvn files to .tst files Thanks, Vinoth
-
Custom Assertion in Jython
Hello, looking for a sample script that can read environment variable and compare it to the JSON response value. Also, please point me to the scripting documentation to use with SOATest, if any. Thanks!
-
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…
-
assertion
can someone tell how to validate(assertion of) the databanked value 0.28545 when we are getting .28545 in the response.
-
how can I validate the field name? in parasoft SOA test
Hello, i want to add an assertion to check the field name is returned as per schema. para soft SOA test 9.9 e.g: "status" : { "serverStatusCode" : "401", "severity" : "ERROR", if I want to check field name "severity" is returned as expected. we have standard assertions to validate the field values , But to add check point…
-
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:
-
How to Assert Service Response Values against a Database
How to Assert Service Response Values against a Database Description: The following workflow will demonstrate a method to validate the data from a Service Response against the data stored in a Database. I will be using the database and Service Response from our Parabank 2.0 Application as an example. If you wish to learn…
-
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 validate if response field is expected to return X and Y.
Hello , I want to assert on a a response field(string comparison assert) . But the response field value returns X and Y . Both values are Valid. I want my assertion to pass the test in both cases. I know we can assert on one expected value. can you please advise which assertion to use to validate the same field with two…
-
How to extract empty tag values into a data bank
Hello, tool: SOA test 9.9 PART 1 I am extracting a value to data data, sometime the data is expected to be empty. The data bank throws an exception that: No nodes found. I want to retrieve some value even though the value is empty. I tried to go into option of data bank and set extract empty value as 'a' - But it did'nt…
-
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
-
Using variable preceded by backslash
I'm trying to assert on a xml tag that should contain a file path. I configure a String Comparison Assertion "Element must contain/Expected value/Fixed" with the following value: ${rootfolder}\${variablefolder}\filename.xml. This gives an error message like "should contain expected value:…
-
How to convert binary format bytes into PDF via parasoft tool.
Hello, I am using parasoft SOA test 9.9 . I want to know how to convert binary bytes to PDF format via Parasoft SOA test tool. Is there any Add-in or extension tool to convert binary bytes into PDF and view the same via browser.
-
DateTime Diff based on current time
Hi, Is there a simple way to use a DateTime Diff with Base Value == test execution time or current system time? Any kind of ${now} variable that exists???
-
How to read JSON response with JYTHON script.
Hello, I am trying to read JSON response via JYTHON script. h def assertresponse(input, context): value = String(input) #value = input.scannedDate() Application.showMessage(value) The above script will read complete response. 1)I want to know how I can read individual field in response and load the value into a variable.…
-
How to validate non-numeric field is ASC or DESC?
Hi All, type: REST API, method: GET 1)My JSON response contains list of documents, In which I have filename field (non-numeric). I can send a parameter in request to get all the documents sorted ASC or DESC on filename. I want to read the filename in response and check the order is ASC or DESC. 2) same way I also want to…
-
How to perform assertion on XML response having CDATA
Performing asserions on CDATA Block.Hello, I have an XML response as below: <soap-env:Body> <SabreCommandLLSRS AltLangID="en-us" EchoToken="String" PrimaryLangID="en-us" SequenceNmbr="1" Target="Production" TimeStamp="2012-04-03T04:07:08" Version="2003A.TsabreXML1.6.1" xmlns="http://webservices.sabre.com/sabreXML/2003/07">…
-
Need to add values to validation sum is 100
Hi, I would like to write a method to summarize these values. Note that XML Data Bank list the percentage value as Percentage, percentage 1, percentage2, etc. There was an example in the forums, but after several attempts, I was not able to get the python script to work. I would like to be able to run the script and verify…
-
Using a value from the request to check the response through Asserter
I am trying to verify that certain element in the response has the same text as another element in the corresponding request. Can you please help me understand how this can be done through XML Asserter?
-
Runtime exception in the test case generated!
Exceptions in QString in the test cases generated...Consider the following code Snippet!! - Its a Qt based application... In one of the generated test case, we have: CODE ... .... const ::QChar * _arg1_0 = 0 ; /* Initializing constructor argument 2 (unknown) */ int _arg2_0 = cpptestLimitsGetMaxInt(); ::QString _text…
-
Writable DataSource has regression control issue
Hey guys. With the help of Greaham we created a test which used a set-up soap client test to create a bunch of values in a writable data source which I then used as an input source for subsequent standard soap client tests. when I attempt to create multiple regression controls via the writable data source,soa test only…
-
Memory/ImageList.cc:206 assertion failed
Possible Insure crashI have an application that dynamically loads shared libraries and resolves an init function table. When I run it with insure it crashes with the error "Memory/ImageList.cc:206 assetion failed". Is this an insure problem or something wrong with my application? I have stripped the application down and…
-
Can I still parameterize the Diff tool after I
create multiple regression controls?Yes, you can still parameterize the Diff tool. Just click on the Diff node and select Form XML from the Mode drop-down menu.
-
How do I diff an incoming SOAP response?
Ensure that the Deserialize Response check box is not selected in the SOAP Client. Right-click the SOAP Client node and select Add Output> Response> SOAP Envelope> New Output> Diff from the shortcut menu. An XML Response> Diff node displays in the test suite tree. Select the Response SOAP Envelope> Diff node in the test…