How to record requests from client in Gatling - gatling

I have a Java desktop application. I want to know if there is a way to record server calls (GET & POST requests) using Gatling where requests will be generated from desktop application. I am trying to use Gatling for load testing.

Related

Accessing os files with django inside an electron application

I have a web application built with Django/React. I want to convert it to an electron app and am unsure if I need to refactor some of the backend code to node.js.
Here is the relevant information:
User needs to create a file with their own API token received from 3rd party. I would like to avoid sending their personal token to my server and want to keep it on their operating system.
Django uses the token to query data from the 3rd party api.
Django sends data back to front end.
My question is, once the application is bundled as an electron app, can django access their api token and query the 3rd party api without hitting my server? Will the django code be run on the localhost (or can it) is I guess what I mean.
Thanks, hope this is a valid SO question.

separating environments for concurrent users using JMeter & selenium webdriver

How can I separate environment for each JMeter thread using webdriver to test ASP.net website? I am trying to login (using different users with table file) and the tests fails because the cookies that saved from one thread (i.e browser window) interrupting the other threads.
Normally JMeter threads (virtual users) don't share any data, see ThreadLocal concept for more details.
When it comes to WebDriver Sampler each JMeter Thread should kick off a separate browser instance hence there should not be any clashes as each browser should be tied to a different user having its own credentials, cookies, cache, etc.
In general I would recommened reconsidering your test design, according to the WebDriver Sampler documentation:
Note: It is NOT the intention of this project to replace the HTTP Samplers included in JMeter. Rather it is meant to compliment them by measuring the end user load time.
Browsers are very resource intensive so it is unlikely you will be able to kick off more than 10 browsers using mid-range laptop while using HTTP Request samplers you will be able to mimic several hundreds or even thousands of virtual users. So I would recommend creating the main load using HTTP Request samplers and use 1-2 WebDriver Sampler instances to measure page rendering speed while system is under the load.
See ASP.NET Login Testing with JMeter article for more information on testing ASP.NET web applications using JMeter.

Should I upload files to Amazon S3 from mobile devices or from my server?

I have Amazon S3 as my file storage server and EC2 instances as my application logic server. Now my app needs to upload some files which need necessary processing. I can think of two ways to do this:
Upload the file directly from mobile devices and get the file name and location(url), then send the url to my backend. Backend get the file by URL and do its job.
Send the file to backend using a multipart form, backend accepts the file do its job and finally save the file to Amazon S3.
Which is the standard way? What are the reasons?
Sending the object direct to Amazon S3 will be more scalable, less error-prone and cheaper (since you need less web server capacity to handle the uploads). Send the corresponding information to a Simple Queueing Service (SQS) queue that the back-end service can monitor and process. That way, if your back-end is ever offline, the jobs will simply queue-up and will get processed when the server is running again. A good use of loose coupling.
A third option would be to send the file directly from your mobile to Amazon S3, using Metadata fields to identify originating user, and then configure the S3 bucket to trigger some code in AWS Lambda that can process the file. This could do all the processing, or could simply trigger a process on your web server. Again, this reduces load on the web server and would not require sending a message to trigger the processing.

Advantage of Deploying AngularJS application with Restful services on diffeent servers

I want to deploy angularJs app on somw web server and restful services on application servers like tomcat.
Can any one please let me know that what will be the advantage and disadvantages of deploying angularJs app with Restful services on different server or on same servers.
which option will be good including authorization and performance.
Since the html / angularjs code will be downloaded on the clients devices and then the webservice will be called by those clients there is no gain on the response time if the app and the ws are on the same server.
For the rest, it all depends on the load of your website. Distributing the html code to the clients does not take that much of a load, but you will have an apache (or ngix or wathever) + a tomcat + your database running on the same server, it will be ok for most cases, it depends on the success of your website but usually when you have to ask yourself how you are going to manage such a load you have the means to rethink the architecture!
The most important is to have your db and your tomcat on the same server!
For the authorizations, if you use a REST webservice you will have to deal with those damn CORS headers whether or not the app and the ws are on the same server.
Overall, having 2 servers will be more flexible and share the load more evenly but it will also increase the cost, so you will probably be fine with only one!

Can wpf apps use cache stored in the asp.net web server?

We have client side applications written in WPF which are making requests to the server side MVC web app each time.
Since they sometimes are requesting with the same parameters. We want the server side to cache the result.
If one client requests once, another client will use the cache data in the server. But it seems that the client apps are not using the cache data. The second client app will still call the function in the server.
How can we let client side to use cache on the server side?
.Net 4 can use MemoryCache. This article should get you started.

Resources