As a part of routine healthcheck in Siebel application we open few documents from different navigation in Siebel application and check whether it is viewable in browser or not.
If i want to automate then can we prepare some script in which it returns the response code of the documents.
For ex :- 404 error code means not available. In the same way html response code between 200 to 400 means everything is alright.
OR
Any other ways in which i can know whether documents are viewable in browser or not.
Given that the browser directly accesses the documents from the browser, it would be best to record the manual executed event and then replayed. Tools like JMeter or SoapUI. As it is probably a few requests at most one can look at recreating them using wget, or curl.
It is also possible to make this part of a larger test approach and include them in a open source test approach like Robot Framework. It has a HTTP Requests library that allows you to perform tests using http requests. This in addition to the Web service, web browser, database and many other types of libraries that allow an integrated test approach.
Related
I'm creating load testing with JMeter.
We have A Single Page Application (React).
Let's say I need to check the endpoint
GET /foo
When you go to that endpoint via the browser it triggers API endpoints (javascript fetch) to retrieve data. Let's say 2 endpoints
GET /api/fooData, GET /api/fooCalendar
My question is: If I request GET /foo with JMeter (or Postman for instance), will it trigger the other endpoints behind the scene like a normal user flow, or I would need to manually check all the endpoints that are being triggered?
As per JMeter project main page:
JMeter is not a browser, it works at protocol level. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does (it's possible to view the response as HTML etc., but the timings are not included in any samples, and only one sample in one thread is ever displayed at a time).
So you will have to create separate HTTP Request samplers for each JavaScript-driven calls. If the calls are made in parallel - it would be better to put them under the Parallel Controller as JMeter executes Samplers sequentially (upside down)
I have a requirement from client that The overall response time (end to end time including rendering of page in browser) should be 3 secs for all the requests.Its an API with frontend.
As i know jmeter handles server side response time, even if i add embedded resource it just downloads java script ,images etc but doesn't act as a browser. Is there any way where i can get The overall response time (end to end time including rendering of page in browser) .
Could some please help me out with this.Thanks..
You can use JMeter Plugin WebDriver Sampler with associated -Driver Config Elements to achieve overall response time.
Following Links could be useful
Web Driver Tutorial
Web Driver Sampler
You cannot, as per JMeter project main page:
JMeter is not a browser, it works at protocol level. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does (it's possible to view the response as HTML etc., but the timings are not included in any samples, and only one sample in one thread is ever displayed at a time).
So the only way of getting client-side metrics like rendering time you need to use a real browser, for example kick off one using WebDriver Sampler. Metrics can be obtained from Navigation Timing API via WebDriver.executeScript() function
I am using jmeter for performance testing
but jmeter only accept JS call they can not pass request like URL.
so my question is that how can i user jmeter as a normal browser for
load testing ?
As per JMeter project main page:
JMeter is not a browser, it works at protocol level. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does (it's possible to view the response as HTML etc., but the timings are not included in any samples, and only one sample in one thread is ever displayed at a time).
It is possible to configure JMeter to behave more like a real browser when it comes to normal HTTP requests given you:
Tell JMeter to download embedded resources (scripts, styles, fonts, images, sounds, etc.) in parallel
Add HTTP Cache Manager to mimic browser cache when it comes to handling the aforementioned embedded resources
Add HTTP Cookie Manager to represent browser cookies
Add HTTP Header Manager to represent browser headers
JMeter will not automatically kick off the requests triggered by JavaScript as it doesn't have full JavaScript runtime so you will have to add a separate HTTP Request sampler per such a request. If you need to simulate several AJAX requests - consider putting them under the Parallel Controller as browsers execute AJAX request simultaneously
So we are tasked with doing automation against one of our web applications that has a lot of Ajax calls. We can't seem to get the Test Recorder to work, so right now we are manually writing out those requests. There is a particular web grid that contains about 100 rows x 20 columns of data. We are trying to measure how long it takes to load up that grid. The response data doesn't have any information on the grid too. Do you guys have any idea how to tackle this?
Using HTTP(S) Test Script Recorder will not help too much as it generates sequential calls while AJAX requests are parallel.
As per JMeter project main page:
JMeter is not a browser, it works at protocol level. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does (it's possible to view the response as HTML etc., but the timings are not included in any samples, and only one sample in one thread is ever displayed at a time).
So I would recommend reconsidering your approach and use i.e. WebDriver Sampler plugin in order to measure page loading time using a real browser instance. This way you will also be able to get extra information from the Navigation Timing API
If for some reason WebDriver Sampler approach is not acceptable for you - make sure that JMeter sends the same requests as real browser does:
Capture requests which are being sent by JMeter and by the real browser using a sniffer tool like Wireshark of Fiddler
Compare the requests, identify the differences
Amend JMeter configuration until requests would be exactly the same (apart from dynamic values in cookies or parameters)
Also be aware that you can mimic AJAX requests parallel execution in JMeter using Parallel Controller plugin.
I have read something about TDD. My field is web development.
Namely server side (Python + Django).
In a book I read: let's check whether our local web page has a 'html' tag.
I would say that for learning purposes it is ok. But a real web page should be validated by https://validator.w3.org/
They say that even for famous web sites not every page passes the validation. Well, let us assume that we decided to develop a nice web site and our policy is 100 % passing of the validation.
Well, the plan seems to look like we should automatically submit our web page to the validator and check for errors. How can it be done?
By the way, I don't have a public IP.
Is it a good plan to:
1) Pay more to ones Internet provider and get a public IP.
2) Run a webserver in debug mode. In this case at the development stage the web site will be visible from a real world.
3) Pass the address of the web page being developed to the validator via Selenium?
4) Check for errors via Selenium again.
Is it a good idea or is there a better plan? Can I get by without a public IP?
You can download a copy of the W3C validation program and run it locally.
There are also a number of other offline HTML validators such as HTML Tidy and Total Validator.
You might also consider running the validation as a part of continuous integration. There are plugins for Jenkins and other CI servers such as the Unicorn Validation plugin.