loadrunner How to connect db in Ajax truclient scripts?

  • Thread starter Santhakumar Thanikachalam
  • Start date
  • perf-test.com need your contributions to build up a strong repository of performance engineering resources.

S

Santhakumar Thanikachalam

Guest
How to connect db in Ajax truclient scripts?
 
Someone may correct me if there is new functionality in there, but TC is designed to communicate via HTTP. So unless you've built a service or interface to talk to your DB via that protocol, you are looking in the wrong place. Build a web service or look at database protocol in VuGen for your specific flavor of DB.
 
Hi u can use java vuser or c vuser protocol to connect db in above 2 protocols jvuser(java vuser) is a best option by writing simple jdbc code you connect to any db. Also some sample codes available in online. Please let me know any doubts on using jdbc code ready to help as I'm also working same way to connect my db while running any stored procedures or queries from our lr script.
 
Actually we have 3 different application in my script . i create truclient script for 1 and 3rd application in between i need to check the DB values for 2 nd application .once my action completed , then 3 rd application has to start .my main concern is LR did not identify the 2 nd application so i need to check it manually/automatically from DB to complete the action .in that case how can i proceed with c vuser.
 
it is not supported out of the box. You can try implementing it on your own. The browser might block it due to cross domain scripting though
 
Hi Shlomi Nissim the above code which was written in http protocol and it was working fine .but it's not working in TC
 
You can record using java over http protocol and write the java code to access db. I never tried it though