How to send test results to InfluxDB - selenium

I currently have a set of tests (Selenium/UI). I want to send test result metrics to Grafana. I am thinking of sending the test results to the Influx database and redirecting them to Grafana at the end. Where do I start?

Related

How to execute function in backends every x minutes

This is my issue:
I have an API which updates every 30 seconds the result displays on an endpoint
I want to display the result on my website for all visitors and so update it automatically every 30 seconds
I don't want each visitor to send a request on my API as it would overwhelm the API (and it is clearly not the right way to implement it I guess).
Is there a way to send one request every 30 seconds from my website backend to my API in order to display it for all visitors on the website?
Or maybe there is another smarter/efficient way to do it?
Another question I'm asking, I want exactly the same "front" website content for all users. I mean, there would have requests from frontend to backend to have the information, but I don't want some users to have the information earlier as their requests would be few seconds before other users. I was thinking to "send requests based on GMT+1 hour for example", I don't know if it makes sense or if there is another way ?
N.B.: I'm using Wix services, maybe I would have to change and build my proper website
Thanks a lot for your answers
Hugo
Is there a way to send one request every 30 seconds from my website backend to my API in order to display it for all visitors on the website?
You could use realtime communication between your website and your backend server. For example Socket.IO or SignalR depends on the stack you are using. So instead of sending a call every 30 seconds, the API server would dispatch an event to all clients and tell them to update (or send the data along when you dispatch the event).
I want exactly the same "front" website content for all users.
As for your second question, if you opt to use realtime communication to sync data between backend and frontend then there should be no need for having requests sent on a timer as your data is always updated actively from the server side.

How can i test using multiple users , a sign up page with OTP using jmeter

My website has an OTP authentication at the time of registering to the website. I need to pass the otp that is send to both email id and mobile number into the next page, register and do rest steps in the website. I need to do it with 500 users. Please help me, if there is any solutions
You can use JMeter's Mail Reader sampler (maybe in combination with Regular Expression Extractor) to get the OTP from the email message generated by your system, store it into a JMeter Variable and use in login request.
See How to Create a JMeter Script to Check Email During Registration AND Grab the Confirmation URL article for detailed steps.
If you need do to it for 500 users I guess you'll need to have 500 email accounts, so you might need to use CSV Data Set Config to read keep email/password pairs from .csv file.

Uber API sandbox - history is empty

I am testing Uber API User Activity endpoints in sandbox.
I have created a request, then successively changed its status from "processing" to "completed" - request details returns me status: "completed".
However when I try to fetch history (both v1.1 & v1.2), I receive an empty "history" array: {"count":0,"offset":0,"limit":5,"history":[]}
Is it currently impossible to test history in the sandbox, or am I doing something wrong?
The sandbox is meant to test the /request endpoint so that you can test your code without requesting a live ride. This means a fake ride is created when you make a POST to /request which you can change the status for, get a receipt or map, and cancel, as you have been able to do.
When using other endpoints like /products or /history, real data is returned, even if you are in the sandbox. The rides or set variables in sandbox do not affect this data -- i.e. your sandbox ride does not get added to /history, and making a product surge in sandbox does not change real estimates in /estimates/price.
You are receiving empty history because the user associated with the access token has not taken any real rides with Uber. The response reflects the actual history and this is the correct way to test the history endpoint.

Does New Relic real time monitoring assume a single user logged in to a web application?

I wanted to know if I get different results in New Relic real time user monitoring when many users are logged into the application concurrentky? Or the only way to achieve that is to use a load testing tool?
You will likely see different results when more people are using your site at once.
The JavaScript injected for Real User Monitoring (RUM) collects timing information in the browser that contains details to identify the specific app and the web transaction processed on the backend, as well as how time was spent in the app for each request. When a page completes loading in an end user’s browser, RUM sends the information back to New Relic asynchronously, so it doesn’t affect page load time. RUM uses the IP address to resolve the geographic location of each request.
For more information on this see, how real user monitoring works, on the New Relic knowledge base.

Authorize.net Integration

I am attempting to integrate Authorize.net into my site. I have set up and activated a test account in their test.authorize.net domain and have obtained and inserted their API key/login for my account into my configurations. I run my script through their API and I get the proper success message that they've received the information. However, every time I log into the test.authorize.net domain and search for the transactions via their Search tab, it always returns with nothing regardless of what parameters I search with. What can cause this?
Look in the unsettled transactions. That's where they'll be.
FYI, Authorize.Net developer accounts do not actually process transactions. They only validate that the data you sent over via their API was valid and complete. If it is you will receive an approved response with a fake transaction number, approval, and AVS response code (which is always a match). If your made an invalid API call an error message will be returned alerting you to your error so you can correct it.
If you don't want o call Authorize.Net for support or they give you the run around, you can also get help in their developer forums.
Authorize.net does not actually log transactions in test mode.
You should call their support; they are fantastic. However, from my experience you typically get a shared account where lots of tests are running and it can be hard to search for your transaction.