TestRail API returned HTTP 429("API Rate Limit Exceeded - 180 per minute maximum allowed. Retry after 1 seconds.") - testrail

Getting error message while doing automation parallel execution with TestRail integration as below -
TestRail API returned HTTP 429("API Rate Limit Exceeded - 180 per minute maximum allowed. Retry after 1 seconds.")
Ideally, it would be very difficult to manage testrail to log all execution details when we choose parallel execution.

What you could try as an alternative is to aggregate some of the results up and post them in batches.
http://docs.gurock.com/testrail-api2/reference-results#add_results_for_cases
It will allow you to attach multiple results for a test run at the same time. So you could group all results in the teardown fixture of a class or a full suite of tests and post all results.
Would that help?

Related

Execution ID on Google Cloud Run

I am wondering if there exists an execution id into Cloud Run as the one into Google Cloud Functions?
An ID that identifies each invocation separately, it's very useful to use the "Show matching entries" in Cloud Logging to get all logs related to an execution.
I understand the execution process is different, Cloud Run allows concurrency, but is there a workaround to assign each log to a certain execution?
My final need is to group at the same line the request and the response. Because, as for now, I am printing them separately and if a few requests arrive at the same time, I can't see what response corresponds to what request...
Thank you for your attention!
Open Telemetry looks like a great solution, but the learning and manipulation time isn't negligible,
I'm going with a custom id created in before_request, stored in Flask g and called at every print().
#app.before_request
def before_request_func():
execution_id = uuid.uuid4()
g.execution_id = execution_id

Why did I suddenly get "You've exceeded the Rate Limit" error?

Problem:
On July 23, this code suddenly stop working.
Environment:
I am running this code on Google Apps Script.
I call only 14 calls per day for the coin gecko API server.
8 calls / sec. is the Coin Gecko's rate Limit.
50 calls / min. is its Free Plan's Rate Limit.
I am using Coin Gecko Free Plan.
I do use Utilities.sleep() accordingly.
There are no problems with the browser. https://api.coingecko.com/api/v3/coins/bitcoin/
The busy-server-error-message used to be a different message. But now it returns a different error message.
Error Message:
Exception: Request failed for https://api.coingecko.com returned code 429. Truncated server response: {"status":{"error_code":429, "error_message": "You've exceeded the Rate Limit. Please visit https://www.coingecko.com/en/api/pricing to subscribe to ... (use the muteHttpExceptions option to examine the full response)
Code:
function test() {
const URL = 'https://api.coingecko.com/api/v3/coins/bitcoin'
Utilities.sleep(10000)
const fetchedData1 = UrlFetchApp.fetch(url)
console.log(fetchedData1)
Utilities.sleep(10000)
const fetchedData2 = UrlFetchApp.fetch(url)
console.log(fetchedData2)
}
Try adding Utilities.sleep(10000); before CoinGecko.tryCatch(i); to reduce the calls rate to the API.
Use trial and error to find the "optimal value" for the Utilities.sleep parameter and use together with an advanced algorithm like exponential backoff to handle Google Apps Script performance variations.
Related
Too many simultaneous invocations 50 different scripts and triggers
Is Coinmarketcap API blocking requests from Google IP's?

unable to get status code of oci-cli command

i need to get the response code to use in scripts
like i run a command
oci compute instance update --instance-id ocid.of.instance --shape-config '{"OCPU":"2"}' --force
i will get this message
ServiceError:
{
"code": "InternalError",
"message": "Out of host capacity.",
"opc-request-id": "3FF4337F4ECE43BBB4B8E52524E80247/37CB970D371A9C6BB01DFB23E754FE5B/18DFE9AE75B88A77AB3A1FBEBD3B191B",
"status": 500
}
in this case, i got the error message and a status code 500
but if the commond works, it will output a full json of my instance's parameters, and i can only see a line of response code 200 in debug mode
is there a way to only show the response code?
Currently OCI CLI does not provide the HTTP response code directly in the response. The response would either contain the service response in case of success or a service error message in case of error.
Can you explain how you are using the HTTP response code in your script? Could you not use the command error code (non-zero on error) to determine the error case?
The ERROR: "Out of host capacity" means The selected shape does not have any available servers in the selected region and Availability Domain (AD). Virtual Machines (VM) are dynamically provisioned. If an AD has reached a minimum threshold, new hypervisors (physical servers) will be automatically provisioned.
There may be some occasions where the additional capacity has not finished provisioning before the existing capacity is exhausted, but when retrying in 15 minutes the customer may find the shape they want is available.
Alternatively, selecting a different shape, AD or region will almost certainly have the capacity needed.
Bare metal instances: Host capacity is ordered on a proactive basis guided by the growth rate of a region. Specialized shapes such as DenseIO do not have as much spare overhead and may be more likely to run out of capacity. Customers may need to try another AD or region.

ESPv2 with Google Cloud Functions upstream request timeout

I'm having issue getting answers from a Google Coud Function going through ESPv2.
Every time I request it, I get a response 15 seconds later with a status code of 504.
My function take between 30 to 45 seconds.
In the logs the functions correctly and answer back after 35 seconds.
Is there a way to increase the timeout in ESPv2 ?
Thanks
For anyone else having this issue, in the openapi-functions.yaml under the x-google-backend you should had the attribut deadline and set it to whatever value in seconds you want.
Here is the hidden documentation https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#deadline
Issue related: https://github.com/GoogleCloudPlatform/esp-v2/issues/4
Depending on the documentation you used to secure the endpoints of your Cloud Function’s with ESPv2, this should be possible. If you are using Cloud Run to host your ESPv2, a 504 error is sent when a request exceeds its request timeout limit. The request timeout limit is a setting that specifies the time within which a response must be returned before sending a 504 response. You can change this value by going in your “Cloud Run” tab, selecting your ESPv2 service, selecting “Edit & Deploy new Revision”, scrolling down to the capacity section and setting the time in milliseconds. This is some documentation that could prove helpful when working with the topics discussed.

Supplying 1 JDBC request result to multiple threads in JMeter

I'm facing an issue in Jmeter. The API I am testing, get the parameters from a prior JDBC request.
This works fine when there is only 1 thread. But, when I run multiple threads it throws the error below
{"Message": "A transient error has occurred. Please try again. (1205)","Data":null}
Here is the screenshot
I need to run 5 threads without having to run the JDBC request 5 times.
I can retrieve 5 results in 1 JDBC call and supply them sequentially for each of the thread. Is this possible? How can I do this?
Worst-case scenario I will have to manually set up CSV file instead of JDBC calls.
Normally people use setUp Thread Group for test data preparation and tearDown Thread Group for eventual clean-up. I would suggest moving your JDBC Request under the setUp Thread Group and run it with 1 virtual user.
If you have to keep the test plan structure as it is and can amend the SQL query to return more results, be aware that according to the JDBC Request sampler documentation the results look like:
myVar_#=5
myVar_1=foo
myVar_2=bar
myVar_3=baz
myVar_4=qux
myVar_5=corge
Therefore you can use the values using __V() and __threadNum() functions combination like:
${__V(myVar_${__threadNum},)}