How to calculate response time between elements in web page using Robot Framework selenium - selenium

I have a browser where customer told to automate the test case of calculating the response time between elements when click and load time of it.
is there any keyword available ?

the best solution for that is to mesure accoding to Jmeter, it's not time that will come from code because there is difference between machine and machine , but on the API side there is no difference therefore the solution will be the Jmeter for example

So this will possibly answer your question
Calculating response time is widely used technology, so you could just make simple google...
There are more other, different questions and tutorials about this

Related

Google Optimise Delivering No Sessions When Using UTM Targeting

I have a Google Optimise experiment running whereby I'm targeting the utm_medium parameter. I have tried almost every variation of experiment I can imagine and every time I target this parameter my experiment receives nearly no sessions. Couple of helpful things:
I have run experiments using simple geo-targeting which run fine on the same account, so the Optimize installation is hopefully correct
I am only testing one single image change, and it's working with simpler targeting on my landing page
I've tried measuring against my main (lead gen) objective but also session duration and bounce rate, all with the same result
When I check my tagged URLs in the 'checker' tool, every variant (https and http) give me a green 'passed' verification to say that my tagged URLs SHOULD be triggering my experiment
I have attached my targeting criteria so hopefully this is helpful!
Any help would be incredibly appreciated!
Targeting Rule in Place

How do I create/delete item in my DB via API in Cypress?

Can you please give some more examples how do I skip UI and fill in DB with API calls in Cypress?
I am rather new to Cypress, and can't find a solution myself.
Thank you in advance!
Cypress is only going to help you with
... anything that runs in a browser
You need to design this API layer for your test harness. Put simply, Back Door manipulation and Fixture Setup patterns is what your looking for. Combining both will improve the automation UI suites. Adding and reusing such API layer will make your suites fit enough to be part of the product’s daily life, not counting on heavy nightly regressions.
More details in my post on the topic.
Based on the limited amount of information you gave us I am taking a calculated guess on this. First you can easily call an API with .request(). With that you could have your API do whatever it wants to the DB. I am not sure what you mean by SKIP UI. You want to test that so you can't SKIP it, but you could mock the API returns to fill in the information you want.

Selenium and Postman integration or other approach?

I am looking for general idea, approach and subsequently a right tool.
I plan to start testing administration panel. Stable parts of it can be tested by mean of selenium-python scripts. But the challange starts when before testing some funcionalities in panel I need to sent a batch of data via Postman to API endpoint.
As you know Postman is a native app, so it doesn't offer a url which selenium driver could access (browser extension is deprecated.
So the question is. Would it be possible to integrate and automate the process in one selenium script?
Is it possible to do it with Postman or there is another tool that can send a request to endpoint and can be integrated with selenium script?
One more thing. The best approach would be: Sending request and few second after that action start selenium test on data which have been delivered via request to panel. I need to fully automate the process and set those actions with no sighnificant time delay.
Curious about possible solutions.
For API Automation purpose, Use Rest Assured. Its easy to learn, implement. You'll be able to fully automate apis(both JSON & XML). All the validation will be done in seconds. If you integrate RestAssured & Selenium, you'll be able to validate data with API & front end.
Please let me know if you need to know more on this.
Sample GET Code :-
RestAssured.baseURI="base url Eg :- https://www.google.com/";given().header("Accept","application/json").header("Authorization","Value").when().get("rest of the part of the url").then().assertThat().statusCode(200).and().contentType(ContentType.JSON).and().body("name[0]",equalTo("Location"));
Sample POST Code :-
RestAssured.baseURI="https://www.google.com/";
Response res=given().header("Authorization","Value").header("cache-control","no-cache").header("content-type","application/json").body("{"+"\"format\":[\"live-blog\",\"video-story\",\"Photo Gallery\",\"photo-gallery\",\"blank\",\"breaking-news\",\"photo-story\"],"+"\"language\": \"english\""+"}").when().post("Rest of the url`enter code here`").
then().assertThat().statusCode(200).and().contentType(ContentType.JSON).extract().response();
String res_string= res.asString();
System.out.println(res_string);
JsonPath jpath = new JsonPath(res_string);
String articleid = jpath.get("[0].articleId");
System.out.println(articleid);
You can find all the jar files online.
Apologies for the format.
Selenium purpose is not testing your app's APIs, but web. I would suggest as someone commented here, use Java with Rest-Assured, it's very reliable, easy to learn, and fast.
You can use Java's API call if you need anything specific for your web testing, as a requirement or something else.
Since you are using Python already, you could easily use the 'requests' python package to send your API requests and parse the responses as required. This would allow you to easily integrate this into your overall script, sending the api requests, ensuring the necessary response, then starting the selenium steps.

Using Jmeter, how to find how many simultaneous users  Web server will handle

I have downloaded the JMeter and played around it. It is working fine. I have one quick question. I need help in this.
Using JMeter tool How can I say that given webserver handles efficiently n number of user at the given second or minute.
.
Please help me as soon as possible.
Thank You
Regards
Ganapathy
Answer to that question is the very reason why we do performance testing.
We primarily want to find out how application response time grows as we increase the number of parallel users.
To find out you can start with jMeter Plugins Ultimate Thread Group to gradually add users during a test.
To visualize test results, use Response Times vs Threads graph, which also comes with jMeter Plugins.
But that graph only shows average response time for specific number of users. To include time component use Composite Graph in which you'll include number of threads (users) and response time and you'll be able to see real time how response time changes with number of users.
That's where I'd start.
Try to increase the number of requests (and threads that fire requests) and see how the answer time behaves. Part of the answer is the question which response time is acceptable for you. Also note that this will not be equal to real users as you are firing requests from a single machine and in a manner not comparable to real users requesting real pages.
Read this comparison, it may help you.

What's the simplest/easier way to do a health check/smoke test in an internal web app?

I have an intranet web application and I would like to do a simple health check/smoke that runs once an hour to make sure that everything is how it is supposed to be.
The tests are supposed to do some requests and check response for text and in some cases do one or two POSTs to see if the application in answering like it should.
I thought about using Selenium or Visual Studio's WebTest and schedule the run via CC.NET or another CI application but seems like a big shot for a simple thing.
Any ideas?
Thanks
Selenium is a good option. So is PhantomJS.
I dare to say that SWAT could be a good choice for you. It does exactly what you say - makes various http calls and check data returned, also it is possible to pass the test results to different report systems, using TAP format which swat is compliance with. And finally there is a simple DSL to write such a checks.
Regards, the author.