0

I am trying to run REST API from Load Runner but unable to do it. Every times its throws below exception

Action.c(4): Error -26612: HTTP Status-Code=500 (Internal Server Error) for "http://ipaddress/LoyaltyApi/api1/loyaltycard/linkcard", Snapshot Info [MSH 1 1]    [MsgId: MERR-26612]

My code :

Action()
{
    lr_think_time(10);
    web_custom_request("LinkCards",
                      "URL=http://ipaddress/LoyaltyApi/api1/loyaltycard/linkcard",
                      "Method=POST",
                      "Resource=0",
                      "EncType=application/json",
                      "Mode=HTTP",
                     "BodyFilePath=linkcards.json",
                      LAST);
    return 0;
}

I have tested the same URL with POST parameter in POSTMAN and it's working fine without any issue.

I am very new in this technology so unable to solved the issue. Please help.

Rajesh k
  • 1
  • 1
  • 6
  • Error 500 generally means that this call is breaking server logic. Possibly something is missing (cookies, post parameters etc.) Is it recorded or manually written? – tserg42 Jun 02 '16 at 12:15
  • It is manually written dear actually we will not use recording for rest api because if i paste in browser it is giving glassfish message.so i did manually. – Rajesh k Jun 03 '16 at 06:11
  • Could you add the configuration you used in `POSTMAN` to your question? It might help understanding what's wrong. – tserg42 Jun 03 '16 at 12:07

1 Answers1

-1

I am very new in this technology....

Assuming your management has moved you to this role, have they provided you with training on the tool and a mentor for a period of time. If not they have set you up for failure.

James Pulley
  • 5,606
  • 1
  • 14
  • 14
  • If you know the answer just provide here in case don't know the answer just ignore dear why this type of management is not provided training not good. – Rajesh k Jun 03 '16 at 06:09
  • Because your issue is directly related to a validation of your foundation skills before beginning this profession, training on the tool and the availability of a mentor during your first several gigs, up to a year. Or, if you must, this is directly related to poor testing skills, not checking for expected results (how is a tool mechanical skill), not branching your code when expected results fail (a tool language foundation skill) and potentially not handing dynamic data (a conceptual and tool mechanical skill) – James Pulley Jun 03 '16 at 13:50