您的位置:首页 > 产品设计 > UI/UE

Performance testing using LoadImpact on IBM Bluemix Platform

2020-02-16 21:01 423 查看

LoadImpact on IBM Bluemix Platform

There are plenty of types of testing to keep track on out there. In this article, we will talk about how to use LoadImpact service on IBM Bluemix to do performance tests that you can carry out on your website and how you can configure your test execution plan to carry out these tests. Note that most of these tips are catered for small and medium enterprises, and might not apply for larger companies


Before we begin, let’s talkabout what is a performance test, and why should I care?

Let’s say you want to throw an open charity party, where anyone and everyone isinvited. You want as many people to come, have a great time and hopefullydonate some money in the process. You’ve spent weeks decorating the shop,preparing and sending all the invites and nudging people to spread the word.The response is phenomenal – everyone wants to come! But here’s where yourproblems begin.

Becauseyour gate is too small, your guests are stuck queuing at the front doors. Noone was directed to specific parking places, and there just aren’t enough staffto mop up the punch that keeps spilling on the floor. The music is deafeningthe guests in the concierge and one of the staff who is supposed to collect thedonations called in sick and a replacement isn’t available… The list goes onand on.

Theparty was a success, yes, but also a resounding failure. One third your guestsleft before they got to even hear about the charity. A second third felt thatyour services were both slow and unreliable and went home grumbling about it.The rest of the party had a ball, but could’ve had a better experience.

Soundsfamiliar? The same thing happens when you launch your website as well. Lots ofwork goes into sprucing up the decorations, creating advertising campaigns andpushing for your website to ‘go viral’. When traffic floods in, however, manywebsites find that they aren’t built for the load and end up  failing whenit is most vital.

Whatwebsite performance testing does is that it simulates a party at your shopbefore the day of the party itself. This allows you to see if your gate(bandwidth) is too little, traffic direction (load balancing) issues aresmooth, or if your customer service times (load times) are too long. By loadtesting, you can save yourself a lot of worry on the day of the party and giveyour customers a much better experience.

Ifyou’ve never explored the possibilities of testing your website’s performancebefore, the information might be overwhelming. To understand the whole processin detail, you will first need to learn about the different types of testingyou can perform.

Sothe performance testing/load testing, will let us well know oursolution/website’s capability. Such as how a system would perform under aspecific amount of load. How many concurrent users that our server can handle.

 

No more inessential words, let’sbegin the excited work.

First, you need an IBM Bluemixaccount(that’s easy to get it from http://ibm.biz/BluemixChina, and it’s also free of usebefore the end of this year). And then login into IBM Bluemix website and findthe Load Impact service under Catalog/Weband Application, refer to the below screen capture.

And then you can select the “SPACE” where you want the Load Impactservice created for, and you can also change the Service name if you want, leave it unbound to any Apps(it’s astandalone service that will not bound any apps, and each SPACE may only have oneLoad impact instance exist), click “CREATE” to deploy an instance toyour SPACE. You can also click the “VIEW DOCS” to check moreinformation.

 

After the service created, go to your SPACE and under servicesection, you will find the Load Impact service

Click the service, and it will bring you to below screen, andclick “LAUNCH LOAD IMPACT DASHBOARD” to the Load Impact main page.

 

If you have run any testing, you can see the test reportunder the main page at “My tests

Now lets’s begin to create the essential elements for aperformance testing, hear we called it User scenarios.

Auser scenario defines what URLsor web pages should be loaded by the simulated clients during a load test.User scenarios canbe created in several ways. Starting on the User scenarios page,you click the Createuser scenario button to create a new scenario.

Afterthat you have several options – if you know exactly what individual URLs you want the user scenario to load, you can write theload script for the scenario manually. This is rarely the case though, so abetter option is to enter a URL in the Script generation field and then eitherclick the Auto-generate button or the Record session button.Below we chose the Record session button.

It will need to set the proxy of the browser to let itmonitor the urls that go through the webs, and then record it. After yousuccessfully pass the proxy setup, the “Start recording” button shows

There are also data store can be configed and used by thescripts to get different number/strings to replace the parameters with thescripts.

The data store can be imported from a CSV file.

Below is the recorded scripts, and it’s also shows how to openand use a data store with the scripts, more information, you can also click theright corner’s API Documention

 

 

A test configuration describesthe load test you want to run – how many simulated users the test should loadyour site with, and what those users should do on your site (what pages theyshould load on the site).

You can create and edit testconfigurations on the Testconfigurations page.

In the testconfiguration you have to supply a target URL to the site you want to test. If you then tryto start the test without performing any additional configuration, Load Impactwill start an automatic test for you, running a ramp-up test at a quite low load level. 

Finally, youcan configure your test to use one or more user scenarios. When editing your test configuration you will seea Userscenarios section that can be expanded by clicking on itsplus (+) icon. In this section you can specify that a certain percentage of allthe simulated users in the load test will run a certain user scenario. You canalso choose which geographic region to run each scenario from, allowing you todistribute the simulated load across different types of users coming fromdifferent geographic locations.

In the testconfiguration you can also define the clientand network emulation and some extra setting such as IPs.

There are an another most useful feature is to schedule youtest configuration runs at regular intervals

Any time you want to run your testing, go to Test configursations tab to click the “Starttest” button.

Then the test result will show at the My tests tab.

 

Summary

The cost of poor applicationperformance can have a major negative impact on your business. With BluemixLoad impact service, you can determine how your application will behave in thereal world before your customers discover performance shortcomings. Cloud-basedload testing can reduce your load testing lab setup time, provide potentiallyenormous computing resources, and help you pay for the computing power you needonly when you need it. Add in geographically diverse data centers, and you candetermine the experience your customers will enjoy from different parts of theinternet over the globe.

 


  • 点赞
  • 收藏
  • 分享
  • 文章举报
KOOLINCN_SH 发布了1 篇原创文章 · 获赞 0 · 访问量 121 私信 关注
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: