httprequest

How to count failed requests with jmeter

我的未来我决定 提交于 2019-12-05 08:35:38
I am running JMeter and I want a count of all the failed requests that either timed out, or, just plain failed. I see that some of the listeners show that there have been failures, but none see to have a field that displays the total number of failed requests versus successful requests. Does anyone know how I can easily get this data without having to count each failure by hand? Add timeout to your sampler Add assertions on code and response content Use aggregate report You should have these figures Add the Aggregate report to the thread group.Which gives you total transaction count and the "

Check for valid session: isRequestedSessionIdValid() vs getSession(false)

两盒软妹~` 提交于 2019-12-05 07:56:54
I'm developing Java Servlets. At the point of checking whether a user is logged in, I want to check if the HTTP request has a valid session. For checking that, I have 2 possibilities: (1) protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(false); if (session != null) { // user is logged in ... } } Since I pass false as an argument, there is no new session created if there is no valid session existing already, and the function returns null, for what I can check. Or I do: (2) if

Chrome extension: identify web requests of background-page iframe?

做~自己de王妃 提交于 2019-12-05 07:50:23
I'm writing a Chrome extension that periodically checks a web-page on the user's behalf. To be unobtrusive, the page is loaded into an iframe on the extension's hidden background page. Is it possible to identify just the web requests made by this iframe? My initial experiments (see below) seem to indicate that this is tricky. Getting all web requests for a particular tab is easy: you have the tabId, and can filter web requests (via the WebRequest API) with that tabId. But for a background-page iframe, it's unclear what the "tabId equivalent" identifier is, or how to use it to filter web

How to instantiate Spring bean with custom scope and @Autowired dependencies?

情到浓时终转凉″ 提交于 2019-12-05 07:16:48
问题 In our project, we use Spring request scoped beans. Now we've a requirement to support async requests and request scoped beans don't work for child threads. I'm aware of RequestContextFilter and it's "support" for async but it appears that RequestContextFilter expects the main thread to wait for the child threads to finish, which isn't the case for us. Our main thread immediately returns after spawning new threads using @Async annotation and DispatcherServlet clears out the

Multiple Images vs spritesheet

。_饼干妹妹 提交于 2019-12-05 06:37:10
"Simple" question. Is it better to use large spritesheets for site elements than using multiple images? I mean,do the additional CSS image manipulation (background positioning a large image and cropping it) compensate for the fewer HTTP image requests? The number of concurrent HTTP/1 connections to a host is limited to about 6. Assuming a latency of 100ms, the about 60 images in the posted sprite would take at least a whole second to download (probably more, since HTTP requests and answers need to be generated and parsed). Since the size of the sprite image is about the same as the individual

How to change content of Post Body in JMeter HTTP Request

夙愿已清 提交于 2019-12-05 05:23:52
Please forgive my ignorance as I'm a jmeter noob. My webservice accepts JSON objects so I was able to write a rudimentary test where I create an HTTP Request with a JSON object in the "Post Body" portion of the http request. Anyway, what I want to do is have the HTTP Request choose a different JSON object from a csv file or some other input mechanism so that I can randomize the types of queries that are being run during the load test. Is there a way to do this? The closest is probably using variables (section 4.11 in the user manual) but I have a feeling that's not how variables are used. A

How to emulate a real http request via cfhttp?

僤鯓⒐⒋嵵緔 提交于 2019-12-05 04:59:09
I need to emulate a real http request via cfhttp. I was getting rss feed with ColdFusion, but tonight they started to block my request and send an index page in response instead of rss fead. I added useragent for cfhttp, but it doesn't help. Opera, Firefox and Chrome open feed correctly from the same computer. Yep, thanks. I sniffed all HTTP headers which browser sends to the site and then emulated them in cfhttp request. The solution is: <cfhttp url="http://example.com/feed" useragent="Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.7 (KHTML, like Gecko) Chrome/5.0.391.0 Safari/533.7"

Question regarding browser behavior when a response is sent from a server

半城伤御伤魂 提交于 2019-12-05 03:09:35
Scenario: The browser submits a HTTP request to a server. The user simultaneously clicks on a bookmark or on another link on the page resulting in a new request to the server. The server now sends back two HTTP responses (or the browser gets responses from two servers). How does the browser decide which of the responses to actually process? I know what will happen - am trying to understand why. Any references or websites that explain this would also be much appreciated. Thank you, vivek. Edit: Saw this similar question after asking. Please merge/delete if appropriate. gatkin The short answer

Chrome won't play mp3 files?

时光怂恿深爱的人放手 提交于 2019-12-05 02:51:31
There's something very weird on my server- chrome won't play mp3 files on it. for example, when chrome is pointed to an mp3 file on first server: http://tinyurl.com/czqfw5a - it won't play. When I place the same file on my second server: http://tinyurl.com/cju4yg4 - it works fine. I checked http response headers, on both servers it looks fine- mime type is set correctly. The problem happens only with chrome. ff / ie work fine. Anyone have an idea? Short story , it's this bug: http://code.google.com/p/chromium/issues/detail?id=110309 Long story is in the way it works, Chrome asks for the MP3

Can't understand `@Autowired HttpServletRequest` of spring-mvc well

筅森魡賤 提交于 2019-12-05 00:19:09
问题 In our spring application, we use HttpServletRequest in two ways: (the code here are simplied, and seems meaningless) In the controller: @RequestMapping(value = "/hello", method = RequestMethod.GET) @ResponseBody public ResponseEntity<String> hello(HttpServletRequest request) { System.out.println("## controller req.hashcode: " + request.hashCode()); System.out.println("## header 'abc': " + request.getHeader("abc")); return new ResponseEntity<String>("OK", HttpStatus.OK); } In a normal