Loadrunner HTTP Status-Code=500 (Internal Server Error) - performance

I try to make a login on facebook with Loadrunner Script, but I get always this:
vuser_init.c(41): Continuing after Error -26612: HTTP Status-Code=500(Internal Server Error) for "https://www.facebook.com/".
This is my request Script (Function):
web_submit_data("login.php",
"Action=https://www.facebook.com/login.php?login_attempt=1",
"Method=POST",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=https://www.facebook.com/",
"Snapshot=t30.inf",
"Mode=HTML",
ITEMDATA,
"Name=lsd", "Value=AVpPvlAG", ENDITEM,
"Name=email", "Value={FACEBOOK_LOGIN}", ENDITEM,
"Name=pass", "Value={FACEBOOK_PASSWORD}", ENDITEM,
"Name=default_persistent", "Value=0", ENDITEM,
"Name=timezone", "Value=-60", ENDITEM,
"Name=lgnrnd", "Value=013117_8ain", ENDITEM,
"Name=lgnjs", "Value=1392111088", ENDITEM,
"Name=locale", "Value=de_DE", ENDITEM,
EXTRARES,
LAST);
any help would be appreciated.

You don't test third parties without the express written permission of those who own, manage, and control the servers plus the commissioner of baseball. To do otherwise is to engage in a denial of services attack. Facebook has a very capable performance engineering team and they do not need your uncontrolled inputs onto their system
Use the sample applications for learning or any LAMP, WAMP or WISP applications installed on hardware/VMs that you own, manage and control.
The topic of "What causes a 500" and how to recover from it has been covered amply over the past two decades. Take advantage of your research skills to uncover existing lore on this topic.
Bad Magic

Related

Laravel Dusk running two browsers in parallel

I want to test two browsers running at the same time and making a purchase of the same one product. (One browser should be successful and the other to come back with an error message)
I tried using two instances of the Browser class like this:
$this->browse(function (Browser $first, Browser $second) {
$first->visit('/');
$second->visit('/');
$first->click('.btn.purchase');
$second->click('.btn.purchase');
}
The problem is that they are not running in parallel. I clearly see that the first one clicks and waits a bit then the second clicks. It is as if it has to wait for the click to take action or something.
My goal is to have the two browsers working independently without waiting for each other.
I searched a lot online but found so little documentation and no clear case about my situation.
I hope someone can help. The main question is how to have two browsers working independently at the same time using Laravel Dusk.
Creating Multiple Browsers
$this->browse(function ($first, $second) {
$first->loginAs(User::find(1))
->visit('/home')
->waitForText('Message');
$second->loginAs(User::find(2))
->visit('/home')
->waitForText('Message')
->type('message', 'Hey Taylor')
->press('Send');
$first->waitForText('Hey Taylor')
->assertSee('Jeffrey Way');
});

Repeating +CMGS - first ok, then not working

I'm using this code to talk to a stock GSM modem... (Telit/Simcom etc)
// ------------------------------
sprintf(localbuf, "AT+CMGS=\"%s\"\r", recipient);
Serial1.write(localbuf); // initiate the SMS conversation
if (waitFor(5000, "> ", "ERR")) {
sprintf(localbuf, "%s%c", textMessage, CTRL_Z);
Serial1.write(localbuf); // send the message body
//... I wait for the +CMGS: response here - all good
} else {
Serial.write("\r\n-- SMS >PROMPT FAIL --");
retval = false;
}
... and move on
The first message - no problem - it works fine.
If I do other things and come back to send another - no problem.
Including other modem conversations (CSQ, CCLK etc)
But if I try to send more than one message fairly close together (in a loose loop), the second +CMGS request fails to return the '>' prompt... ?
Any thoughts.
Thanks in advance
SOLVED - Well - so far so good (SFSG?)
I discovered that if I hold-off for a second AFTER the final CMGS:... .OK is received - the following messages work as expected.
So I guess that 'OK' really isn't OK (!), no matter what testing or polling I had tried earlier - the modem simply isn't ready until it's ready.
Thanks for reading. I hope this helps someone else.
EDIT: The data sheet quotes 20mS between sequential commands, but it's more like 200mS inworst cases...

LoadRunner Viewstate

In other posts I have experienced some issues with record and playback of an app and I was told that viewstate could be something that I should look into regarding this issue.
I have a chunk of code here that is working during replay (not the same app though), but the point I am making is the same:
web_submit_data("overview.jsf",
"Action=https://wasapp-q1.adeo.no/some/sa/overview.jsf?execution=e4s1",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=https://wasapp-q1.adeo.no/some/sa/overview.jsf?execution=e4s1",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=overviewSearchForm:searchCriteriaId", "Value=01024531232", ENDITEM,
"Name=overviewSearchForm:j_id111", "Value=Get ", ENDITEM,
"Name=overviewSearchForm_SUBMIT", "Value=1", ENDITEM,
"Name=javax.faces.ViewState", "Value=cxeGmdwmyti6LtCKFbfHsLGYkE6QJ+eGozLlfTsidCNXrT2KqQ+JviDhkv7MCtdmlnxzQZVOMo9uO9ZrjUUdfpfFJMwwRfg/A09/Em5tTUJxNZ6fUe5LGK9oitXNeeBh0M5Yd7nwXn5uj1bLQzluR09kUUA2dnwrXajncw==", ENDITEM,
LAST);
This chunk of code is not working:
web_submit_data("hello_world_2",
"Action=http://d26jbsl00003.test.local:8080/wow/behold/83512/considervilkar?5-1.IBehaviorListener.0-vurdereVilkarListe-vurdereVilkarRepeater-4-considerVilkarListItem-considerHoved-innerPanel-vilkarDetaljer-vilkarForm-vilkarsregelValg",
"Method=POST",
"TargetFrame=",
"RecContentType=text/xml",
"Referer=http://d26jbsl00003.test.local:8080/vedtak/behandling/83512/vurderevilkar?5",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=vilkarsregelValg", "Value=OPPFYLT", ENDITEM,
LAST);
Both code chunks call web_submit_data. Assuming that Viewstate has something to do with the replay issue of the last one, what does:
"Name=javax.faces.ViewState", "Value=cxeGmdwmyti6LtCKFbfHsLGYkE6QJ+eGozLlfTsidCNXrT2KqQ+JviDhkv7MCtdmlnxzQZVOMo9uO9ZrjUUdfpfFJMwwRfg/A09/Em5tTUJxNZ6fUe5LGK9oitXNeeBh0M5Yd7nwXn5uj1bLQzluR09kUUA2dnwrXajncw==",
actually mean in LoadRunner context? Could it have something to do with my second chunk of code not working (not having a Viewstate)?
State is something which changes with every request. So, ViewState is something you will need to correlate for almost every request (when it is present). There is also jsessionstate that shows up on Java apps, ViewState is typically associated with ASP and ASP.Net
Try using AJAX Truclient, this will help you alot.
No correlations needed there.
Viewstate is a value which changes with every login .It is a 64 bit encoded value returned by the server upon login.
you can try correlating the value ,from the response of the previous request.

Google Play in-app billing version 3: crash on "item already owned" and missing failure notifications

After (eventually) shipping a v2 implementation of the Google Play in-app billing, I've had nothing but problems with it post-launch. Dropped transactions, crashes, unable to restore, crazy errors like "can't download, you already own this item", and all sorts of other ridiculous things. Honestly, I've integrated IAB on iOS, Amazon App Store, Samsung Apps and Blackberry 10 now and the Google Play code has taken more time than all the others combined. Times ten. It's just terrible.
Anywayyyy, I've decided to try and implement v3 into my app. The integration process was much, much simpler, so kudos to Google for that. Also, restoring previous transactions now works as expected so that's great. However, I've got a couple of show-stopping problems:
When the user dismisses the IAB dialog (i.e. tapping outside of the dialog borders), I don't receive any notification of this. I would expect to receive some kind of "user cancelled" failure event, but nothing is fired to onIabPurchaseFinished, onConsumeFinished or onQueryInventoryFinished. As a result my app doesn't respond to this and I'm left with a dirty great unused Activity on the screen. Am I missing some kind of "dialogIsFinished" event?
When the user tries to purchase an item that they already own, the app crashes. Unbelievably it looks like this is the intended behaviour, as there's something alluding to this printed to the console ("In-app billing error: Unable to buy item, Error response: 7:Item Already Owned"). I understand that I'm supposed to query for restorable transactions at launch, but this isn't a solution as it's conceivable the user can navigate to the purchase flow of my UI before the restore operation finishes. Surely this should be a non-hard stop, like a dialog box or something? Am I doing something wrong here? I simply can't understand that somebody at Google thinks that this situation deserves a hard crash...
Thanks very much (in advance) for your help. I'm more than happy to share code if you think it's necessary, although my questions seem to be more about the functional design more than anything else. I'm hoping that I'm doing something wrong here, as it's inconceivable to me that a company as capable as Google would re-write this entire system and still have such massive holes all over the place... :-/
Thanks again,
Ben
Hmm, that was my mistake. When I wrote launchPurchaseFlow(), I ended up missing some cleanup code on failure cases. Not only there, but also on a couple of catch{} clauses after that. Thanks for pointing that out! This has just been fixed in the source repository: http://code.google.com/p/marketbilling
I had the same error, I accidentally forgot to consume the item after I purchased. But when I tried to purchase another of same item App crashed.
I dig through the Google IabHelper class and found out that this statement is not handled correctly. I made some small change and now it works. Instead of crashing send error message back with listener.
Here is the modified part of the code. It's in launchPurchaseFlow() method. I'm not sure that I did something good by changing the code it looked like needed. Hope it helps.
try {
logDebug("Constructing buy intent for " + sku);
Bundle buyIntentBundle = mService.getBuyIntent(3, mContext.getPackageName(), sku, ITEM_TYPE_INAPP, extraData);
int response = getResponseCodeFromBundle(buyIntentBundle);
if (response != BILLING_RESPONSE_RESULT_OK) {
logError("Unable to buy item, Error response: " + getResponseDesc(response));
result = new IabResult(response, "Unable to buy item");
if (listener != null) listener.onIabPurchaseFinished(result, null);
/* Finish Current Async Task*/
flagEndAsync();
} else {
PendingIntent pendingIntent = buyIntentBundle.getParcelable(RESPONSE_BUY_INTENT);
logDebug("Launching buy intent for " + sku + ". Request code: " + requestCode);
mRequestCode = requestCode;
mPurchaseListener = listener;
act.startIntentSenderForResult(pendingIntent.getIntentSender(),
requestCode, new Intent(),
Integer.valueOf(0), Integer.valueOf(0),
Integer.valueOf(0));
}

How would I approach updating all people currently on a page's pages when someone triggers an event?

For example, someone enters a comment onto a page — how would I cause all other browsers on that page to say reload it to receive the new update? Specifically I am looking at 'dynamically' updating NOT 'periodically' updating. Minimal bandwidth for maximal efficiency.
I am no expert programmer — please simplify the solution if possible.
There is HTTP Server Push technology, but from what I heared, I would always prefer polling (consumes less server resources and is more compatible).
You could use websockets, which are part of HTML5.
var socket = new WebSocket("ws://example.com:8000/websocket.php");
socket.onmessage = function(msg) {
// update content here
alert("New content:" + msg);
}
However, you would have to have a server-side technology that supports it.

Resources