I have been walking through a course on SOAPUI relating to the following conversion Rate API that is mentioned in https://www.soapui.org/docs/data-driven-tests/using-files.html
When setting up a test case to convert from EUR to USD and adding an assertion of 1.318 it returns failed -- Missing token[1.318] in response.
The XML response is as follows, however i can not see why it is failing and there is no further information. The only indication is that for some reason the conversion rate result is of a negative value. I have tried this for a number of values but all come back as failed with the conversion rate result always -1
Thanks,
Tim
The resource have been broken, so it have not been able to give a valid response. It does not exist now. Solution is given here. And it states that you should try another resource for testing: working resource
Related
I have used jmeter to record login flow of application , when i re run it there are some requests failing so i fetch dynamic values from earlier responses and supplies those values to subsequent requests
I am facing some issues there is State token in requests but format of this is changing dynamically so because of that when i rerun some time requests are passing some time failing
Here those are
Fail case
{"stateToken":"00UaBoY\x2D81AIL32Nz9qmUJrIarSv3OgfUdd8FHGSkb"}
{"stateToken":"00C8O4pt\x2DcSPEzHrt69zqmEGta9KbjdwywEVdkICku"}
{"stateToken":"00JgMsy7\x2DzXDP0gxaeWv4dj8EguFTWtnLxV\x2DBKTkIq"}
Working case
{"stateToken":"00fswJVHKpW7dNhNVK0bRclBBrsuMLHBBevJ8IS1Wz"}
{"stateToken":"00ZVZXpSJn7v3lxNTrEqy1mAGydgroO5apvoTlWH2u"}
My regular expression for capture state token is stateToken":"(.+?)"
what is issue here ?
the second issue is saml,relay state are not working even regax working fine in regax tester , i am getting "An error was encountered with the requested page". in debug sampler those 2 variables are getting and passed ( screenshot is attached )
Anyone have ideas related above 2 issues please give some ideas to sort out this
Your failing requeststokens have\x`.
You will have to encode the value and send the request.
In HTTP Request
Check the filed URL encode?
Encoding the value with function
It sounds like a bug in your application, I don't think it's JMeter issue, presumably it's due to presence of these \x2D characters (may be incorrect work of unicode escape)
I don't know what does your application expect instead of this \x2D try to inspect the JavaScript code of the application to see what it does do the tokens, when you figure this out you can replicate this token conversion logic in JSR223 PreProcessor and Groovy language
Hello.
I met the following problem.
What I should do:
I need to make a performance test of services. I don't have documentation. In this case, I record the requested services and responses using Jmeter and the browser. Then I review every one sample and add a regular expression extractor - if it's needed.
What's the problem?
The problem that I met is when I run the script from Jmeter, some requests have two or more responses. When I use regular expression extractor or response assertion, I noticed that the extractor or assertion is applied only to the last response. So can I apply the regular expression extractor and response assertion to responses that I need?
Here are some screenshots for more details:
This picture shows that we have two responses from one request and you can see details about the first response.
This picture shows details about the second response.
This picture shows the response code for the first response.
Same as the previous picture, but I added a Response Assertion - to check if the assertion works for the first response.
This picture shows the response code for the second response.
This picture shows the assertion failure.
Why has this has happened?
Probably this happened because I hit an URL (endpoint), and this URL forces other requests, that weren't recorded. So... maybe I need to configure the recorder options in another way.
Whats the questions:
Is there is a way to choose what response I can use with a regular expression extractor? For example, there are two responses and I want to use a regular expression extractor to the first one.
Which are the best settings for recording using Jmeter?
"Whats the answers":
No, you have choice between Main sample and sub-samples, main sample only, sub-samples only or JMeter Variable
The ones which are defined in the Recording Template are most probably the best, at least they're better than anything else I've seen so far. The general approach of "recording" might be a big mistake itself, at least for Web 2.0, I believe there are way better options of replicating browser traffic.
Coming back to your first question and possible solutions: you're basically being redirected that's why you're getting 2 subresults, one with status code 302 and another one with 200
With normal Response Assertion you can only amend its configuration to take both status codes as successful:
If you want to test that exactly the first subresult has status code of 302 - you will have to go for JSR223 Assertion and implement the acceptance criteria in Groovy.
Example code:
if (prev.getSubResults().first().getResponseCode() != '302') {
AssertionResult.setFailure(true)
AssertionResult.setFailureMessage('Response code mismatch, expected: 302, got: ' + prev.getSubResults().first().getResponseCode())
}
I'm not really sure exactly how long it takes before I get this error, but after a period of time, I get "The content-type is not JSON compatible" error. I am able the query just fine from graphql playground but not in my app. I am using persisted queries, so not sure if that is the cause.
The only fix is to restart my app.
Here is the
stacktrace
Based on the stacktrace you posted I can see that the server (in particular, probably the resolver for whatever query/mutation you are sending) is returning something unexpected i.e. not "JSON compatible".
Based on what you provided, that's all I can say. Please add more details and I can provide additional help. Just including the stacktrace is not enough to determine the cause of this issue.
I am submitting an Accept.js nonce as the payment source for an authorization, and I am receiving this error:
There was a problem charging your card: The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:customerProfileId' element is invalid - The value 'eyJjb2RlzJENzE1NEM3MDREMzdCMDI2ODczIiwidG9rZW4iOiI5NTMyMzEzMTY1MjA1NzQ1MTAzNTAyIiwidiI6IjEuMSJ9' is invalid according to its datatype 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:numericString' - The Pattern constraint failed
I tracked the code which is referring to the cusomer profile, so I can clearly see that I am not using the nonce in the correct way. The problem is, I'm not sure whay the right way is.
I can see that apple payments are doing exactly what I need to be able to do manually here.
Am trying to get authenticated with the API and it is saying "The consumer key passed was not valid." msg="Invalid consumer key". Before that it was saying that the oauth_signature is invalid and I have struggled for a day with it and now that error is not showing up. Please find my code in the above gist.
You help is much appreciated on this.
There are a handful of reasons that you might see this error, all of which mean that your oauth 1.0a protocol is likely incorrect.
I highly recommend you test your app alongside this tool : http://hueniverse.com/oauth/guide/authentication/
Below are the important steps to check.
Compare your base string to the Hueniverse base string. If they match, you are likely signing incorrectly. If they do not match make sure you are sorting the parameter keys properly
If the base string matches, check your signature method and your signing process. The secret of your request should be client_secret& OR client_secret&token_secret. Note the ampersand always exists.