How to call web api service from Test User Code
How to call web api service from Test User Code
I have a .net library that I use with unit tests that will call web api service provided by qTest to update tests in qTest as pass or fail. This library is working fine in the specflow solution and unit tests but when I try to use the same code in a user code module created from a validation step the call to create the object fails citing a timeout trying to connect to the web api service while creating the instance. I have validated my connection information and it matches what I am using in the spec flow test. Is there something about Ranorex code modules that prevents calling to web api or web services?
Re: How to call web api service from Test User Code
As of now it appears that the service is taking much longer when called via Ranorex but I have had it work correctly a few times. Will update if I find more but in the meantime if there are any ideas on if anything in Ranorex or its processes could be slowing this down I would greatly appreciate the input.
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: How to call web api service from Test User Code
Hello txrackack,
I'm wondering where exactly you are adding your user code. What exactly does this mean "....try to use the same code in a user code module created from a validation step". Do you use the Recording.UserCode file?
If yes, you can create a separate user code module instead converting a validation action within a recording module.
Regards,
Bernhard
I'm wondering where exactly you are adding your user code. What exactly does this mean "....try to use the same code in a user code module created from a validation step". Do you use the Recording.UserCode file?
If yes, you can create a separate user code module instead converting a validation action within a recording module.
Actually no, there is nothing that I can think of preventing an web API call.Is there something about Ranorex code modules that prevents calling to web api or web services?
Regards,
Bernhard