More Testing Video Screencasts Tutorials and Courses on Coursinator.com
2 minutes read
When do you need to load test or measure the loading time of your application on localhost:
- before you deploy your application the first time and assign a public IP
- during development of a new feature that you want to test in terms of performance metrics
Below are the steps that will help test your application on localhost:
- Go to https://ngrok.com/
- Create an account
- Download the ngrok software on your localhost
- Install the auth token that you have been assigned when you created the account on https://ngrok.com
./ngrok authtoken 2CN4XNu97Hk2KCbuKF9pp_2NqX7j8kBntMBSEuG9mwv– change the last part with your auth token
- Start ngrok on your localhost like:
./ngrok http 80– this will forward the requests to port 80 on your localhost (in case you need another port just change 80 to the desired port)
- Once started in the command line you will see the url that you need to use in your load test (should be something like the following:
- Log into your LoadFocus account and create your first test
- Set Test name, the location from which you want to run the test and the url which in this case will be something like: http://adafce35.ngrok.io
That’s all. Enjoy.
P.S.: Ngrok software will have an impact on the results of the test but is a good starting point until you will deploy your application on the production environment.
LoadFocus.com is a Cloud Testing Platform used for Load and Performance Testing for Websites and APIs and Website Speed Testing with Analytics.