You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a web method/webservice (.aspx/asmx) which is implemented with [WebMethod]. I tried to test the webmethod call "GetItemDetailsTest" using using HTTP POST but I am not able to test as all requests are failed in statistics. Does Locust support webservice/webmethod call?
Expected behavior
web method executed
Actual behavior
request failed
Environment settings
OS: Windows
Python version: python-3.7.4-amd64
Locust version: 0.11.0
Steps to reproduce (for bug reports)
asmx (written with C# and asp.net): http://192.168.1.155/clientmodule45/Inventory/Inventory.aspx
Method in Server (written with C# and asp.net):
[WebMethod(EnableSession = true)]
[System.Web.Script.Services.ScriptMethod(ResponseFormat = ResponseFormat.Json, XmlSerializeString = false, UseHttpGet = true)]
public static int GetItemDetailsTest(int ItemId)
{
return 101;
}
Script to test WebMethod (locustfile.py):
from locust import HttpLocust, TaskSet, task
class LoginWithUniqueUsersSteps(TaskSet): @task
def UpdateUserSession(self):
self.client.post("/GetItemDetailsTest", {
'ItemId': '1234'
})
Description of issue
I have a web method/webservice (.aspx/asmx) which is implemented with [WebMethod]. I tried to test the webmethod call "GetItemDetailsTest" using using HTTP POST but I am not able to test as all requests are failed in statistics. Does Locust support webservice/webmethod call?
Expected behavior
web method executed
Actual behavior
request failed
Environment settings
Steps to reproduce (for bug reports)
asmx (written with C# and asp.net):
http://192.168.1.155/clientmodule45/Inventory/Inventory.aspx
Method in Server (written with C# and asp.net):
[WebMethod(EnableSession = true)]
[System.Web.Script.Services.ScriptMethod(ResponseFormat = ResponseFormat.Json, XmlSerializeString = false, UseHttpGet = true)]
public static int GetItemDetailsTest(int ItemId)
{
return 101;
}
Script to test WebMethod (locustfile.py):
from locust import HttpLocust, TaskSet, task
class LoginWithUniqueUsersSteps(TaskSet):
@task
def UpdateUserSession(self):
self.client.post("/GetItemDetailsTest", {
'ItemId': '1234'
})
class LoginWithUniqueUsersTest(HttpLocust):
task_set = LoginWithUniqueUsersSteps
host = "http://192.168.1.155/clientmodule45/Inventory/Inventory.aspx"
sock = None
The text was updated successfully, but these errors were encountered: