Neoload- Encountering Request with id has already been processed - performance-testing

I need some help with neoload testing software. By firing the script only once, I received the following error "{"title":"Request with id "Auto-generated ID" has already been processed.","status":409,"traceId":"Auto-generated ID","errors":{}}. After looking through the "record response", I couldnt find any dynamic id that can be replaced.
Tried looking through the record response and found nothing dynamic related to the ID

Related

Using GooglePay with Stripe Gateway

I'm having a problem configuring GooglePay using the Stripe gateway because it says the "stripe:publishablekey" is missing after I click the "Continue" button in the GooglePay payment sheet.
In my code, this occurs in the loadPaymentData(paymentDataRequest) line which displays the GooglePay payment sheet and is supposed to return a response(with a payment token) after finishing according to this. But is not happening because of the error I mentioned above.
In my paymentDataRequest object, I already have the "stripe:publishablekey" field and I don't get why it's saying that it's missing.
I've already tried copying the field that is in the Tutorial from Google where the "k" in the stripe:publishablekey is supposed to be capitalised like this "K" but it only gives another error message that says "stripe:publishableKey" is an invalid field.
Sorry for my bad english and also this is my first time asking a question in stackoverflow.
I can't say for sure what the problem that you're facing is, however, I was able to get it to work with the following: https://jsfiddle.net/u3snqdwm/
FYI, I'm using stripe:publishableKey with a capitalized K.
tokenizationSpecification: {
type: 'PAYMENT_GATEWAY',
parameters: {
'gateway': 'stripe',
'stripe:version': '2018-10-31',
'stripe:publishableKey': 'pk_test_MNKMwKAvgdo2yKOhIeCOE6MZ00yS3mWShu'
},
},

Can't seem to find the issue with the requestID parameter for the request header

I am trying to pull data from a REST API that uses a "similar standard to JSON RPC". The params I am passing look right according to the documentation here and here.
The error I am receiving is ...message:"Header missing request ID".... I am unsure what I am missing that would properly declare the requestID.
I have looked at the documentation provided via the API I am trying to pull data from but it's not very helpful considering it's all in PHP and cURL. I am trying to complete this task using python-requests.
getParams = {'method': 'getCustomers', 'params':{'where':'', 'limit': 2}, 'id': 'getCustomers'}
Result:
{"result":null,"error":{"code":102,"message":"Header missing request ID","data":[]},"id":null}
The return result should contain a list of All Customers and their attributes in JSON format.
Turns out there is nothing wrong with the code I am using. There is an issue with the API I am attempting to call.
In my situation, I was getting the same error back and was required to send a X-Request-ID header. I fixed it by adding the following to my headers:
headers = {
'X-Request-ID': str(uuid.uuid1()) # generate GUID based on host & time
...
Note that (for me) the GUID needed to be of a specific format (e.g. matching the Regex ^[{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$
taken from https://www.geeksforgeeks.org/how-to-validate-guid-globally-unique-identifier-using-regular-expression/). For example, it still gave the same error if I just sent "test".

mail-listener2 - How to prevent function from reading wrong emails?

In my E2E test, I'am using the mail-listener2 to retrieve e-mails. It works fine, except one issue which is driving me crazy and just can't solve it... I have been searching and found different topics and issues regarding this library/package, but just couldn't really find the fix for that.
Following:
I use the function in more than one spec file (register, login, confirmation etc.), and this means that when retrieving the emails, I get from time to time the wrong one. In other words, the function reads the last e-mail in the Inbox which normally belongs to the first test.
Or sometimes the e-mail comes in the Inbox a little bit later that the function is reading them, so it reads the wrong one.
And as I do have an expectation in my it() function:
expect(email.subject).toEqual("subject for e-mail 1");
expect(email['headers'].to).toEqual( userEmail );
therefore the test breaks, and it get following error:
- Expected 'user registration' to equal 'user confirmation'.
- Failed: Cannot read property '1' of null
- Expected 'john.doe#foo.de' to equal 'jane.doe#foo.com'.
- Failed: Cannot read property '1' of null
Is there a way how to force the function reads just the specific email per subject and per user?
Yes, you can find this documented on node-imap (which is used by mail-listener2). Search for the paragraph/bullet on search within that package, here's a snippet to help you find it:
For criteria types that require arguments, use an array instead of just the string criteria type name (e.g. ['FROM', 'foo#bar.com']).
Below that, they list several other search criteria you can use, they have to/from for your user criteria, and subject for that one. So applying this to mail-listener2, you would use this in the searchFilter property:
mailListener = new MailListener({
...(other options),
searchFilter: [['FROM', 'automated#message.com'], ['SUBJECT', 'subject for e-mail 1']],
});
And if you need different search criteria for different tests, you can start a new mail-listener session for each test with the new searchFilter criteria.

How can I clear an external ID on a record in NetSuite?

I need to clear/reset the external ID on a record in NetSuite, but nothing I do is working.
Some of the InventoryItem records are incorrectly mapped to records in another system. I have an application that can sync up the two systems, but I need to clear NetSuite's external IDs first.
Responses don't really need to be SOAP-specific. If you know how to do it with some specific NetSuite/SuiteTalk client, that might point me in the right direction.
What I've Tried
First up, I tried using the nullFieldList... but maybe it doesn't work because externalId is an attribute, not an element?
<messages:update>
<messages:record internalId="7777" xsi:type="accounting:InventoryItem">
<core:nullFieldList xsi:type="core:NullField">
<core:name>externalId</core:name>
</core:nullFieldList>
</messages:record>
</messages:update>
The external ID is just a string, so I tried just setting it to blank. Didn't work either.
<messages:update>
<messages:record internalId="7777" xsi:type="accounting:InventoryItem">
<accounting:externalId></accounting:externalId>
</messages:record>
</messages:update>
I even tried setting the external ID to 0, but I get back a "not unique identifier" error
<messages:update>
<messages:record internalId="7777" xsi:type="accounting:InventoryItem">
<accounting:externalId>0</accounting:externalId>
</messages:record>
</messages:update>
Other Info
I'm using NetSuite's SOAP API v.2013_1
When I say "it doesn't work", I mean: after I do the update, I get a success response similar to the following:
<readResponse>
<platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2013_1.platform.webservices.netsuite.com"/>
<record internalId="7777" externalId="42" xsi:type="listAcct:InventoryItem" xmlns:listAcct="urn:accounting_2013_1.lists.webservices.netsuite.com">
<!-- snip -->
</record>
</readResponse>
If you are using scripts in netsuite you can run a scheduled script to clear records in NS by loading each record and setting the externalid to '' using the following simple code:
var rec= nlapiLoadRecord(type,id);
rec.setFieldValue('externalid','');
nlapiSubmitRecord(rec);
This seemed to work for me in my enviornment which was on 2015.2.
Unfortunately my understanding is that once you set an externalid you cannot clear it, you can set it to another value, but not back to null. I have experienced this both using SuiteScript as well as a Boomi process that uses the 2014.1 endpoint. This may have changed in the recent releases, as I have not tried it recently with SuiteScript nor with a newer endpoint.
You can eliminate the externalId on a record once it's been set. Here's an example using the NetSuite gem:
ns_customer = NetSuite::Records::Customer.get external_id: 'ext_id'
ns_customer.external_id = ''
ns_customer.update
Here's the corresponding XML for update:
<env:Body>
<platformMsgs:update>
<platformMsgs:record xsi:type="listRel:Customer" platformMsgs:internalId="199113" platformMsgs:externalId=""/>
</platformMsgs:update>
</env:Body>
I have had to attempt this before as well. I know the pains you describe. I ended up putting a "-" in front of my external ID to unlink it between my systems. You can do this in SOAP or even as a simple one time csv upload. As it was one time, I did csv.

What do CLFAD####E or CLFAD####W indicate in XPages?

While working in XPages many a times I have encountered error messages beginning with CLFAD####E and sometimes CLFAD####W. In my development the error messages that I have encountered look something like this:
SEVERE: CLFAD####E: Exception processing XPage request.
WARNING: CLFAD####W: <SOME ERROR MESSAGE>
I have seen specific error messages on web like in this question with a number replacing #, to be precise CLFAD0111W. Another example I was able to find was this article with CFLAD0246 and CFLAD0134E.
But I haven't been able to find what they indicate? Is there a list of CLFADs which can be looked up to see what exactly the error indicates?
The first part is an internal identifier CLFAD, followed by 4 numbers to identify the error. The last character identifies the type of the message:
I for "Information"
E for "Error"
W for "Warning"
When looking in the XPages source code you will find some property files which let you identifiy a Java property containing the error code. If you search for the property, you can find the element which throws the error message.
F.e.
CLFAD0111W can be found in the path
com/ibm/xsp/core/core.properties
and is contained by the property
warn.PropertyMap.ThePropertyMapwasinaninvalidstate
Searching for this property will lead you to com.ibm.xsp.binding.PropertyMap and the method saveRoot.
Hope this helps you a little bit.

Resources