-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Karate hangs after finishing the test (with large number of inputs) #1245
Comments
@hellomryoo really appreciate the simple example. but I would like you to make one critical change. please use a karate mock on localhost to be the sample service, not google / external for this case. so we will still simulate the http connections (which may be the bottleneck). if needed you can simulate a response delay. look at the gatling example for reference: https://github.com/intuit/karate/tree/develop/examples/gatling and it would be nice if you use 0.9.6.RC4 because I don't want to waste time on things that may have been fixed with ongoing code improvements is it fair to assume that your scenario is non-typical and that you are basically reaching the limits of your machine (CPU + RAM). if this is a blocker, one way you can contribute to the community is to help us make the distributed-testing approach more mature: https://github.com/intuit/karate/wiki/Distributed-Testing else I am inclined to treat this as very low priority, I have put a the dynamic it would also be great if you re-write your test to use a loop, e.g. let me know your thoughts |
moving to project board: https://github.com/intuit/karate/projects/3#card-43330542 |
we now serialize results off-heap to files and we no longer accumulate data in memory
hello @hellomryoo are you there. would you be so kind as to take a look at #1394 (comment) and confirm that it looks good. thanks |
Hello,
I am here to report 2 Karate issues (the first one is the original error, and the second one was found when I was trying to replicate the error).
First Issue
I am having an issue with Karate as it hangs after all the test is completed (before the test result gets generated) when there are a lot of inputs (lots of API requests). I tried to mimic the erroneous behavior by only keeping the structure and replace the API calls with the dummy API ('https://www.google.com') and replaced the data with the dummy variable that only works as a counter.
Background information:
The way it works is requestGoogle feature has a Scenario Outline that runs N times (number elements in the JSON array input - totalData.json) and each case would run sendGoogle feature M times (number of elements in the JSON array input - replyToFormData.json). In our case, M is fixed and N is the number of the case I can increase/decrease (for the test case, I set M to be 9). So, the total requests that are being tested is M * N requests.
Issue
Since M is fixed, I can play around with N to see what's causing the issue. Here is what happens:
On the local machine (MacBook Pro 2018 15 inch with 16GB RAM), I manually assigned the RAM (8/16GB).
I also have changed the Logging from DEBUG to INFO and tried using the parallel execution (with 4). The current project uses parallel execution with 4 threads.
Results results = Runner.path("classpath:examples/users/requestGoogle.feature").parallel(4);
Current repo is set to be N = 400, M = 9.
You can use the command
mvn clean test
to run the project.Here is the repository for the first issue.
automatedTest.zip
Second Issue
Background information:
While I was duplicating the issue, I wanted to simplify the project as much as possible. So I decided to create a Karate project that has only 1 thing (GET request) and tried to run it as much as I needed in my project. (Around 4,000 + requests). Then this is what happens.
Issue
When I say the input number, I changed the number of elements in JSON array (totalData.json)
You can use the command
mvn clean test
to run the project. I used my local machine (MacBook Pro 2018 15 inch with 16GB RAM)Here is the repository for the second issue.
automatedTest2.zip
The text was updated successfully, but these errors were encountered: