SlideShare a Scribd company logo
1 of 4
Download to read offline
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 07 | July 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2629
Scale and Load Testing of Micro-Service
Mohan M S1, Somesh Nandi2
Dept. Electronics and Communication Engineering, R.V College of Engineering, Banglore-560050
---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract - Representational State Transfer (REST)
ApplicationProgrammingInterface(API)basedmicroservices
are more used in cloud applications development due to their
inherent benefits. The advantages include scalability,
independent development of micro-service. The designed
system testing should be validated for functionality and load
handling capability. Load testing framework was designed
using the Locust framework. Developed framework could
generate 2,000 requests per secondpercontainerinitializedin
4 GB RAM system. This system was used to generate the load
for a micro-service. The load was applied to the micro-service
to test scaling features. For testing scale the application was
deployed from 1 pod to N pod configuration. For each
configuration load was applied and response for each
configuration was analyzed and mapped. Testing on higher
number RPS involved delayed response.
Key Words: REST, API, autoscaling, containerization
1.INTRODUCTION
Web Platform for providing services and information is
common for past decade. Every company wants to host its
services online as internet has reached every corner of the
world. Building a web platform would guarantee
accessibility for every consumer. Designing of a Web
Platform for a company to handle millions of customers
requires latest technology, which can handle that much
amount of load. Scaling a monolithic software application is
difficult for large number of users. Hence developing
application using microservice architecture ensures
scalability [1], load balancing, faster deployment and lower
troubleshooting times.
2. MICROSERVICE ARCHITECTURE
Monolithicapplicationwerethepredominantonesbefore
arrival of micro-service based applications. Earlier an
enterprise application was designed as a single software [2].
Monolithic applications gave rise to various issues such as
scale problems and dependency between software
development teams[3].Sinceanenterpriseapplicationcanbe
seen as integration between various components. Idea of
developing these components/services separately was
invented. Micro-service contains various components which
are loosely coupled and independently scalable. The micro-
services would communicate between them using HTTP
REST protocols such as AMQP. To achieve decoupling each
service has separate databases. Consistency in the data is
maintained using various saga mechanism for multiple
services which use same database.
REST Architecture is based onwebstandardsandusesHTTP
Protocols. In REST everything is a resource and accessed
through REST APIs [4]. Server does not maintainanystate of
the client. Client needs to maintain the state and basedonits
state, request is made to the appropriate API [5]. Resources
in REST can be anything like JSON, HTML, text. Most used is
the JSON response. These are the 4 commonly used HTTP
methods.
1.GET – used to access resource, performs read-only
operation.
2.POST – provides access to create resource.
3.DELETE – provides access to delete existing resource.
4.PUT – provides access to update or create a resource.
3. SOFTWARE TOOLS
Development of framework for scale testing involves
different software dependencies. Software used in this
project are Pytest, Locust and Docker.
3.2.1 Pytest
Pytest is python framework forwritingfunctionality and
unit tests for an application. It provides lot of customization
using which we can achieve application specific test cases.
Pytest provides fixtures using which common setupforeach
test case can be written. Fixtures can also be defined in
various levels such as testcase-level, module-level and
testrun-level. It also provides dependency decorators using
which dependency between test cases can be implemented.
The Pytest framework can be used to generate allure report
for testcases easily. While running tests in module level all
the files starting from python gets executed for pytest tests.
For a file all the test function names starting from test or
functions using pytest decoratorareconsideredfortests. For
writing test the function which needs to be tested should be
called inside the test function and its output should be
asserted with the expected output. After running the test,
Pytest framework would show the list of failed tests with
where it has failed. If a statement fails, it also mentions what
is the expected assertion. A test can have multiple assert
statements or check statements. If one of them fails then the
entire test fails. Pytest’s debug options are very useful to
debug it.
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 07 | July 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2630
1) Pytest output formatting: Pytest provides robust output
formatting with various command-line arguments. The
framework provides methods to define what all needs to be
shown in the traceback. Using “-v” flag the verbosity of the
Pytest tests can be controlled. If “-f” flag is used to generate
output, then other jobs like Jenkins can interpret the output
files. It also provides various plugins which can be used to
automate with other automation jobs.
3.2 Locust
Locust is a python-based loadtestingframework which
can be used to test various features of applicationbyvarying
the load. The test scenarios can be written in the python
language. It can be used to generate distributed systemload,
with master and slave nodes. A general web-based ui can be
generated with locust framework. Load can be scaled by
increasing the number of worker nodes which are
generating load. The test is conducted by swarming a web
application with lot of requests. The system on test can be
written in any language. The locust system is completely
customizable with various features.
3.2.1 Locust Web UI
Locust has a built-in module to display the test results in
web UI. The Web UI has various features such as response
time analysis, Exception-analysis, graphical analysis and
Error analysis. Web UI can be disabled for the test to print
only the test results at the end. It can be configured to
modify the number of users, duration on the web UI itself.
The tests can be run in headless mode where the test results
are shown only at the end of the tests. If the tests are run in
multiple machines, then the master node looks after UI
maintenance and worker nodes look after load generation.
Worker nodes communicate withthe masterforsendingtest
reports. The primary job of workers is to span users
specified by master. Locust test can be run in Docker and
Kubernetes environment by creating docker image.
4. TESTING MICROSERVICE
Microservice testing needs to be done at functionality,
load handling capability and scale. Functionalityverification
involves writing test-cases for user transactions. Testing a
greater number of users for deployed application involves
load testing.
4.1 Test framework for API
Pytest framework is used for automation and testing of the
APIs. Pytest provides various features to run series of test in
a customized way. The test results are uploaded intheallure
report for the summary. Requests python module is used in
the test framework to make all the web requests. Initially
session is requested, and the web token is created. On
reference to which API is being tested,a requestbodyissent.
For given API both positive and negative test cases are
written. Written test cases should cover all these responses
from the API while testing. Forpositivetestcasestherequest
is generated with proper request body and sent. Then
received response body is verified with the expected
response. For verifying responsestatuscodealong witheach
response parameters are asserted.SomeoftheAPIsareused
by admins only for testing these APIs authentication should
be generated in a different way.
4.2 Scale and Load Tests
Scale testing and load testing are important tools to identify
how the application behaves in deployment. In load testing
the application is swarmed with requests and the response
time of application is checked. The load is created by
creating virtual users on the system which isusedfortesting
and then each user is assigned with task. The task is
iteratively performed by the virtual user that has been
created. Locust python framework is used for the scale and
load testing in the project. Locust library provides user and
taskset classes which can be utilized to design the tests. In
scale testing the number of Kubernetes pods deployed for
application is increased and response will be monitoredand
verified. The response of the application with different
number of pods is analyzed. Based on the analysisscalability
of application will be decided. For any load test, application
needs to be applied with load. In this case load is web
requests. In real world deployment many usersloginand do
transactions with the application. To imitatethatexperience
in test environment a system is designed to spawn multiple
process with each process corresponding to individual user.
To obtain credible test results large number of login
credentials are stored in the file. This file is used to generate
the independent processes in a machine and each user
performs set of tasks iteratively. Locust provides user class
which is inherited by all the user processes in the
framework. Inherited class contains the details of the user
login credentials and other required information for the
login process.
4.2.1 Virtual users
For any load test, application needs to be applied with load.
In this case load is web requests. In real world deployment
many users log in and do transactions with the application.
To imitate that experience in test environment a system is
designed to spawn multiple process with each process
corresponding to individual user. To obtain credible test
results large number of login credentials are stored in the
file. This file is used to generate the independent processes
in a machine and each user performs set of tasks iteratively.
Locust provides user class which is inherited by all the user
processes in the framework. Inherited class contains the
details of the user login credentials and other required
information for the login process.
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 07 | July 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2631
4.2.2 Tasksets
Individual process needs to perform set of tasks in iterated
manner. Set of tasks contains transactions that regular
would do while using notifications-service. All the tasksets
which user needs to use should inherit from taskset class.
Methods named onStart and onStop are used to createsetup
and cleanup for the tests. In onStart login and authorization
for the user is done. In onStop the session is ended and all
the resources which are being utilized are released. Taskset
class contains a special class called sequential which is used
to ensure tasks are executed in pre-defined order. Locust
also provide another class called Fast Sequential which is
light weight in number of tasks it supports. But using this
class more virtual users can be created per system. Hence
more loads can be generated.
4.2.3 Master and Worker load tests: Complex
application’s real time load cannot be generated in single
machine. Multiple machines should work together to
generate required amount of load. This configuration of
multiple machines in locust is possible with master-worker
mechanism only. Master consolidates test resultsandwrites
to the web UI where test results are displayed.Italsoassigns
each worker number of users it should spawn. Worker
spawns the number of processes it is assigned and sendsthe
report to master. While starting the load testing master
needs to given the number of workers and their IP address.
While configuring all thenodes IPaddressshouldbemapped
properly. It should also be ensured that inter-node message
delay is minimal.
5. RESULTS
5.1 API Test results
Pytest framework was used todesignthetestautomation for
designed APIs. In Pytest automation tests are written as
series of tests. Tests are run every time a new code needs to
be verified. This ensures that new code modifications have
not changed existing functionality. Pytest tests are
configured to generate test results as allure report. Allure
report indicates which are the tests that have failed. It also
displays the traceback of the failures. The test outcomes
classified in three categories. those are success,warningand
failure. 59 test cases are written for the APIs. These tests
include both positive and negative test cases. This test
includes verifying of response body along with status codes.
Pytest’s test results customization was used to write test
results as allure reports.
5.2 Locust results
Locust scale and load testing was done for the application.
The load testing was done by increasing the numberofusers
and analyzing response from the server. In the figure 1
locust test results are being displayed. It is the result of load
testing on single API. There are 120 users who are spawned
as virtual processes in the machine. These users are
independent processes who are sending requests to the
server. In this case all the users are sending request tosingle
API. The test result contains.
Fig-1: Locust test result display
1. Type contains APIs that are been swarmed by requests.
2. Requests contains total number of requests that have
been made to the API.
3. Fails containtherequestswhichhaveresponsecodeother
than 200 HTTP status codes. That is number of requests
which the server has failed to respond.
4. Median, Min and Max columns represent how much time
the response has taken for being processed. For all request’s
max, min and average is calculated per API and displayed in
the UI.
5. It alsoshows current APIrequestspersecondandfailures
per second
Web UI also has other tabs for showing error instances. It
has charts which shows the response and requests details
with time. It has error tab which shows the error
occurrences along with the trace back. It also shows
exceptions that occurred along with the trace back of the
exception. It also has the option to download data of entire
session in excel file.
5.3 New Relic analysis of performance
The App side response along with time taken by each
component is recordedbyNewRelic.NewRelicmonitors the
performance of application and displays it in user friendly
UI. Application needs to be integrated with New Relic to see
the application’s performance. In the figure 2 there is an
instance of New Relic graphical representation of
performance. It has breakdown of application’s response
time with various components of app. It is easy to analyse
which components needs to be optimized. So while running
scale and load test, New Relic data was monitored to see the
bottlenecks in the app performance.
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 07 | July 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2632
Fig -2: New Relic results.
6. CONCLUSION
Developed framework for testing micro-service was used to
test notification micro-service. The framework could
generate load up to 2000 Requests per second per docker
container developed. Detailed framework for testing of
functionality and load was mentioned.Fortestingscale1pod
to 3 pod configurations were load tested. A system break
point was considered when the response time breached 500
milliseconds. Throughput of system for these 3
configurations was tested.
ACKNOWLEDGEMENT
The authors thank Somesh Nandi for the collaboration of
preparing this paper and also Hewlett Packard Enterprise
for providing opportunity to work in this area.
REFERENCES
[1] Virender Ranga and Anshu Soni. “API Features
Individualizing of Web Services: REST and SOAP”. In:
International Journal of Innovative Technology and
Exploring Engineering 8 (Aug. 2019). DOI: 10.35940/
ijitee.I1107.0789S19.
[2] Festim Halili and Erenis Ramadani. “Web Services: A
Comparison of Soap and Rest Services”. In: Modern
Applied Science 12 (Feb. 2018), p. 175. DOI: 10.5539/
mas.v12n3p175.
[3] Joel L. Fernandes et al. “Performance evaluation of
RESTful web services and AMQP protocol”. In: 2013
Fifth International ConferenceonUbiquitousandFuture
Networks (ICUFN). 2013, pp. 810–815. DOI: 10.1109/
ICUFN.2013.6614932.
[4] Ambar Prajapati.“AMQP and beyond”.International
Conference on Smart Applications,Communicationsand
Networking (SmartNets). 2021, pp. 1–6. DOI:
10.1109/SmartNets50376.2021. 9555419.
[5] Kyrylo Malakhov, Oleksandr Kurgaev, and Vitalii
Velychko. “Modern RESTful APIDLsandframeworksfor
RESTful web services API schema modeling,
documenting, visualizing”. In: International Journal of
Advanced Research in Computer and Communication
Engineering (Nov. 2018).

More Related Content

Similar to Scale and Load Testing of Micro-Service

Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questionsRamu Palanki
 
Hp Quick Test Professional
Hp Quick Test ProfessionalHp Quick Test Professional
Hp Quick Test Professionalsunny.deb
 
The 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web FrameworksThe 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web FrameworksKunal Ashar
 
Shuvam dutta | Performance tester
Shuvam dutta | Performance testerShuvam dutta | Performance tester
Shuvam dutta | Performance testerShuvam Dutta
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoringOracle Korea
 
Spring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringSpring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringDonghuKIM2
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Scienceinventy
 
Evolution of netflix conductor
Evolution of netflix conductorEvolution of netflix conductor
Evolution of netflix conductorvedu12
 
IRJET- Application Backup and Restore across Multiple Devices
IRJET-	 Application Backup and Restore across Multiple DevicesIRJET-	 Application Backup and Restore across Multiple Devices
IRJET- Application Backup and Restore across Multiple DevicesIRJET Journal
 
Load Runner Methodology to Performance Testing
Load Runner Methodology to Performance TestingLoad Runner Methodology to Performance Testing
Load Runner Methodology to Performance Testingijtsrd
 
Debugging Microservices - QCON 2017
Debugging Microservices - QCON 2017Debugging Microservices - QCON 2017
Debugging Microservices - QCON 2017Idit Levine
 
ScriptRock Robotics Testing
ScriptRock Robotics TestingScriptRock Robotics Testing
ScriptRock Robotics TestingCloudCheckr
 
Surekha_haoop_exp
Surekha_haoop_expSurekha_haoop_exp
Surekha_haoop_expsurekhakadi
 
IRJET- Testing Web Application using Vulnerability Scan
IRJET- Testing Web Application using Vulnerability ScanIRJET- Testing Web Application using Vulnerability Scan
IRJET- Testing Web Application using Vulnerability ScanIRJET Journal
 
Oracle application testing suite (OATS)
Oracle application testing suite (OATS)Oracle application testing suite (OATS)
Oracle application testing suite (OATS)Koushik Arvapally
 
Building 12-factor Cloud Native Microservices
Building 12-factor Cloud Native MicroservicesBuilding 12-factor Cloud Native Microservices
Building 12-factor Cloud Native MicroservicesJakarta_EE
 
Loadrunner interview questions and answers
Loadrunner interview questions and answersLoadrunner interview questions and answers
Loadrunner interview questions and answersGaruda Trainings
 

Similar to Scale and Load Testing of Micro-Service (20)

Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questions
 
Hp Quick Test Professional
Hp Quick Test ProfessionalHp Quick Test Professional
Hp Quick Test Professional
 
The 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web FrameworksThe 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web Frameworks
 
Shuvam dutta | Performance tester
Shuvam dutta | Performance testerShuvam dutta | Performance tester
Shuvam dutta | Performance tester
 
Shuvam dutta
Shuvam duttaShuvam dutta
Shuvam dutta
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoring
 
Spring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringSpring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics Monitoring
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Science
 
Evolution of netflix conductor
Evolution of netflix conductorEvolution of netflix conductor
Evolution of netflix conductor
 
IRJET- Application Backup and Restore across Multiple Devices
IRJET-	 Application Backup and Restore across Multiple DevicesIRJET-	 Application Backup and Restore across Multiple Devices
IRJET- Application Backup and Restore across Multiple Devices
 
Load Runner Methodology to Performance Testing
Load Runner Methodology to Performance TestingLoad Runner Methodology to Performance Testing
Load Runner Methodology to Performance Testing
 
Debugging Microservices - QCON 2017
Debugging Microservices - QCON 2017Debugging Microservices - QCON 2017
Debugging Microservices - QCON 2017
 
ScriptRock Robotics Testing
ScriptRock Robotics TestingScriptRock Robotics Testing
ScriptRock Robotics Testing
 
Performance testing wreaking balls
Performance testing wreaking ballsPerformance testing wreaking balls
Performance testing wreaking balls
 
Surekha_haoop_exp
Surekha_haoop_expSurekha_haoop_exp
Surekha_haoop_exp
 
IRJET- Testing Web Application using Vulnerability Scan
IRJET- Testing Web Application using Vulnerability ScanIRJET- Testing Web Application using Vulnerability Scan
IRJET- Testing Web Application using Vulnerability Scan
 
Oracle application testing suite (OATS)
Oracle application testing suite (OATS)Oracle application testing suite (OATS)
Oracle application testing suite (OATS)
 
Cisco project ideas
Cisco   project ideasCisco   project ideas
Cisco project ideas
 
Building 12-factor Cloud Native Microservices
Building 12-factor Cloud Native MicroservicesBuilding 12-factor Cloud Native Microservices
Building 12-factor Cloud Native Microservices
 
Loadrunner interview questions and answers
Loadrunner interview questions and answersLoadrunner interview questions and answers
Loadrunner interview questions and answers
 

More from IRJET Journal

TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...IRJET Journal
 
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURESTUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTUREIRJET Journal
 
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...IRJET Journal
 
Effect of Camber and Angles of Attack on Airfoil Characteristics
Effect of Camber and Angles of Attack on Airfoil CharacteristicsEffect of Camber and Angles of Attack on Airfoil Characteristics
Effect of Camber and Angles of Attack on Airfoil CharacteristicsIRJET Journal
 
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...IRJET Journal
 
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...IRJET Journal
 
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...IRJET Journal
 
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...IRJET Journal
 
A REVIEW ON MACHINE LEARNING IN ADAS
A REVIEW ON MACHINE LEARNING IN ADASA REVIEW ON MACHINE LEARNING IN ADAS
A REVIEW ON MACHINE LEARNING IN ADASIRJET Journal
 
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...IRJET Journal
 
P.E.B. Framed Structure Design and Analysis Using STAAD Pro
P.E.B. Framed Structure Design and Analysis Using STAAD ProP.E.B. Framed Structure Design and Analysis Using STAAD Pro
P.E.B. Framed Structure Design and Analysis Using STAAD ProIRJET Journal
 
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...IRJET Journal
 
Survey Paper on Cloud-Based Secured Healthcare System
Survey Paper on Cloud-Based Secured Healthcare SystemSurvey Paper on Cloud-Based Secured Healthcare System
Survey Paper on Cloud-Based Secured Healthcare SystemIRJET Journal
 
Review on studies and research on widening of existing concrete bridges
Review on studies and research on widening of existing concrete bridgesReview on studies and research on widening of existing concrete bridges
Review on studies and research on widening of existing concrete bridgesIRJET Journal
 
React based fullstack edtech web application
React based fullstack edtech web applicationReact based fullstack edtech web application
React based fullstack edtech web applicationIRJET Journal
 
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...IRJET Journal
 
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.IRJET Journal
 
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...IRJET Journal
 
Multistoried and Multi Bay Steel Building Frame by using Seismic Design
Multistoried and Multi Bay Steel Building Frame by using Seismic DesignMultistoried and Multi Bay Steel Building Frame by using Seismic Design
Multistoried and Multi Bay Steel Building Frame by using Seismic DesignIRJET Journal
 
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...IRJET Journal
 

More from IRJET Journal (20)

TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
 
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURESTUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
 
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
 
Effect of Camber and Angles of Attack on Airfoil Characteristics
Effect of Camber and Angles of Attack on Airfoil CharacteristicsEffect of Camber and Angles of Attack on Airfoil Characteristics
Effect of Camber and Angles of Attack on Airfoil Characteristics
 
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
 
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
 
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
 
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
 
A REVIEW ON MACHINE LEARNING IN ADAS
A REVIEW ON MACHINE LEARNING IN ADASA REVIEW ON MACHINE LEARNING IN ADAS
A REVIEW ON MACHINE LEARNING IN ADAS
 
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
 
P.E.B. Framed Structure Design and Analysis Using STAAD Pro
P.E.B. Framed Structure Design and Analysis Using STAAD ProP.E.B. Framed Structure Design and Analysis Using STAAD Pro
P.E.B. Framed Structure Design and Analysis Using STAAD Pro
 
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
 
Survey Paper on Cloud-Based Secured Healthcare System
Survey Paper on Cloud-Based Secured Healthcare SystemSurvey Paper on Cloud-Based Secured Healthcare System
Survey Paper on Cloud-Based Secured Healthcare System
 
Review on studies and research on widening of existing concrete bridges
Review on studies and research on widening of existing concrete bridgesReview on studies and research on widening of existing concrete bridges
Review on studies and research on widening of existing concrete bridges
 
React based fullstack edtech web application
React based fullstack edtech web applicationReact based fullstack edtech web application
React based fullstack edtech web application
 
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
 
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
 
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
 
Multistoried and Multi Bay Steel Building Frame by using Seismic Design
Multistoried and Multi Bay Steel Building Frame by using Seismic DesignMultistoried and Multi Bay Steel Building Frame by using Seismic Design
Multistoried and Multi Bay Steel Building Frame by using Seismic Design
 
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
 

Recently uploaded

Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Servicemeghakumariji156
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
Bridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxBridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxnuruddin69
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086anil_gaur
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Rums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdfRums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdfsmsksolar
 

Recently uploaded (20)

Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Bridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxBridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptx
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Rums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdfRums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdf
 

Scale and Load Testing of Micro-Service

  • 1. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 07 | July 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2629 Scale and Load Testing of Micro-Service Mohan M S1, Somesh Nandi2 Dept. Electronics and Communication Engineering, R.V College of Engineering, Banglore-560050 ---------------------------------------------------------------------***--------------------------------------------------------------------- Abstract - Representational State Transfer (REST) ApplicationProgrammingInterface(API)basedmicroservices are more used in cloud applications development due to their inherent benefits. The advantages include scalability, independent development of micro-service. The designed system testing should be validated for functionality and load handling capability. Load testing framework was designed using the Locust framework. Developed framework could generate 2,000 requests per secondpercontainerinitializedin 4 GB RAM system. This system was used to generate the load for a micro-service. The load was applied to the micro-service to test scaling features. For testing scale the application was deployed from 1 pod to N pod configuration. For each configuration load was applied and response for each configuration was analyzed and mapped. Testing on higher number RPS involved delayed response. Key Words: REST, API, autoscaling, containerization 1.INTRODUCTION Web Platform for providing services and information is common for past decade. Every company wants to host its services online as internet has reached every corner of the world. Building a web platform would guarantee accessibility for every consumer. Designing of a Web Platform for a company to handle millions of customers requires latest technology, which can handle that much amount of load. Scaling a monolithic software application is difficult for large number of users. Hence developing application using microservice architecture ensures scalability [1], load balancing, faster deployment and lower troubleshooting times. 2. MICROSERVICE ARCHITECTURE Monolithicapplicationwerethepredominantonesbefore arrival of micro-service based applications. Earlier an enterprise application was designed as a single software [2]. Monolithic applications gave rise to various issues such as scale problems and dependency between software development teams[3].Sinceanenterpriseapplicationcanbe seen as integration between various components. Idea of developing these components/services separately was invented. Micro-service contains various components which are loosely coupled and independently scalable. The micro- services would communicate between them using HTTP REST protocols such as AMQP. To achieve decoupling each service has separate databases. Consistency in the data is maintained using various saga mechanism for multiple services which use same database. REST Architecture is based onwebstandardsandusesHTTP Protocols. In REST everything is a resource and accessed through REST APIs [4]. Server does not maintainanystate of the client. Client needs to maintain the state and basedonits state, request is made to the appropriate API [5]. Resources in REST can be anything like JSON, HTML, text. Most used is the JSON response. These are the 4 commonly used HTTP methods. 1.GET – used to access resource, performs read-only operation. 2.POST – provides access to create resource. 3.DELETE – provides access to delete existing resource. 4.PUT – provides access to update or create a resource. 3. SOFTWARE TOOLS Development of framework for scale testing involves different software dependencies. Software used in this project are Pytest, Locust and Docker. 3.2.1 Pytest Pytest is python framework forwritingfunctionality and unit tests for an application. It provides lot of customization using which we can achieve application specific test cases. Pytest provides fixtures using which common setupforeach test case can be written. Fixtures can also be defined in various levels such as testcase-level, module-level and testrun-level. It also provides dependency decorators using which dependency between test cases can be implemented. The Pytest framework can be used to generate allure report for testcases easily. While running tests in module level all the files starting from python gets executed for pytest tests. For a file all the test function names starting from test or functions using pytest decoratorareconsideredfortests. For writing test the function which needs to be tested should be called inside the test function and its output should be asserted with the expected output. After running the test, Pytest framework would show the list of failed tests with where it has failed. If a statement fails, it also mentions what is the expected assertion. A test can have multiple assert statements or check statements. If one of them fails then the entire test fails. Pytest’s debug options are very useful to debug it.
  • 2. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 07 | July 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2630 1) Pytest output formatting: Pytest provides robust output formatting with various command-line arguments. The framework provides methods to define what all needs to be shown in the traceback. Using “-v” flag the verbosity of the Pytest tests can be controlled. If “-f” flag is used to generate output, then other jobs like Jenkins can interpret the output files. It also provides various plugins which can be used to automate with other automation jobs. 3.2 Locust Locust is a python-based loadtestingframework which can be used to test various features of applicationbyvarying the load. The test scenarios can be written in the python language. It can be used to generate distributed systemload, with master and slave nodes. A general web-based ui can be generated with locust framework. Load can be scaled by increasing the number of worker nodes which are generating load. The test is conducted by swarming a web application with lot of requests. The system on test can be written in any language. The locust system is completely customizable with various features. 3.2.1 Locust Web UI Locust has a built-in module to display the test results in web UI. The Web UI has various features such as response time analysis, Exception-analysis, graphical analysis and Error analysis. Web UI can be disabled for the test to print only the test results at the end. It can be configured to modify the number of users, duration on the web UI itself. The tests can be run in headless mode where the test results are shown only at the end of the tests. If the tests are run in multiple machines, then the master node looks after UI maintenance and worker nodes look after load generation. Worker nodes communicate withthe masterforsendingtest reports. The primary job of workers is to span users specified by master. Locust test can be run in Docker and Kubernetes environment by creating docker image. 4. TESTING MICROSERVICE Microservice testing needs to be done at functionality, load handling capability and scale. Functionalityverification involves writing test-cases for user transactions. Testing a greater number of users for deployed application involves load testing. 4.1 Test framework for API Pytest framework is used for automation and testing of the APIs. Pytest provides various features to run series of test in a customized way. The test results are uploaded intheallure report for the summary. Requests python module is used in the test framework to make all the web requests. Initially session is requested, and the web token is created. On reference to which API is being tested,a requestbodyissent. For given API both positive and negative test cases are written. Written test cases should cover all these responses from the API while testing. Forpositivetestcasestherequest is generated with proper request body and sent. Then received response body is verified with the expected response. For verifying responsestatuscodealong witheach response parameters are asserted.SomeoftheAPIsareused by admins only for testing these APIs authentication should be generated in a different way. 4.2 Scale and Load Tests Scale testing and load testing are important tools to identify how the application behaves in deployment. In load testing the application is swarmed with requests and the response time of application is checked. The load is created by creating virtual users on the system which isusedfortesting and then each user is assigned with task. The task is iteratively performed by the virtual user that has been created. Locust python framework is used for the scale and load testing in the project. Locust library provides user and taskset classes which can be utilized to design the tests. In scale testing the number of Kubernetes pods deployed for application is increased and response will be monitoredand verified. The response of the application with different number of pods is analyzed. Based on the analysisscalability of application will be decided. For any load test, application needs to be applied with load. In this case load is web requests. In real world deployment many usersloginand do transactions with the application. To imitatethatexperience in test environment a system is designed to spawn multiple process with each process corresponding to individual user. To obtain credible test results large number of login credentials are stored in the file. This file is used to generate the independent processes in a machine and each user performs set of tasks iteratively. Locust provides user class which is inherited by all the user processes in the framework. Inherited class contains the details of the user login credentials and other required information for the login process. 4.2.1 Virtual users For any load test, application needs to be applied with load. In this case load is web requests. In real world deployment many users log in and do transactions with the application. To imitate that experience in test environment a system is designed to spawn multiple process with each process corresponding to individual user. To obtain credible test results large number of login credentials are stored in the file. This file is used to generate the independent processes in a machine and each user performs set of tasks iteratively. Locust provides user class which is inherited by all the user processes in the framework. Inherited class contains the details of the user login credentials and other required information for the login process.
  • 3. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 07 | July 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2631 4.2.2 Tasksets Individual process needs to perform set of tasks in iterated manner. Set of tasks contains transactions that regular would do while using notifications-service. All the tasksets which user needs to use should inherit from taskset class. Methods named onStart and onStop are used to createsetup and cleanup for the tests. In onStart login and authorization for the user is done. In onStop the session is ended and all the resources which are being utilized are released. Taskset class contains a special class called sequential which is used to ensure tasks are executed in pre-defined order. Locust also provide another class called Fast Sequential which is light weight in number of tasks it supports. But using this class more virtual users can be created per system. Hence more loads can be generated. 4.2.3 Master and Worker load tests: Complex application’s real time load cannot be generated in single machine. Multiple machines should work together to generate required amount of load. This configuration of multiple machines in locust is possible with master-worker mechanism only. Master consolidates test resultsandwrites to the web UI where test results are displayed.Italsoassigns each worker number of users it should spawn. Worker spawns the number of processes it is assigned and sendsthe report to master. While starting the load testing master needs to given the number of workers and their IP address. While configuring all thenodes IPaddressshouldbemapped properly. It should also be ensured that inter-node message delay is minimal. 5. RESULTS 5.1 API Test results Pytest framework was used todesignthetestautomation for designed APIs. In Pytest automation tests are written as series of tests. Tests are run every time a new code needs to be verified. This ensures that new code modifications have not changed existing functionality. Pytest tests are configured to generate test results as allure report. Allure report indicates which are the tests that have failed. It also displays the traceback of the failures. The test outcomes classified in three categories. those are success,warningand failure. 59 test cases are written for the APIs. These tests include both positive and negative test cases. This test includes verifying of response body along with status codes. Pytest’s test results customization was used to write test results as allure reports. 5.2 Locust results Locust scale and load testing was done for the application. The load testing was done by increasing the numberofusers and analyzing response from the server. In the figure 1 locust test results are being displayed. It is the result of load testing on single API. There are 120 users who are spawned as virtual processes in the machine. These users are independent processes who are sending requests to the server. In this case all the users are sending request tosingle API. The test result contains. Fig-1: Locust test result display 1. Type contains APIs that are been swarmed by requests. 2. Requests contains total number of requests that have been made to the API. 3. Fails containtherequestswhichhaveresponsecodeother than 200 HTTP status codes. That is number of requests which the server has failed to respond. 4. Median, Min and Max columns represent how much time the response has taken for being processed. For all request’s max, min and average is calculated per API and displayed in the UI. 5. It alsoshows current APIrequestspersecondandfailures per second Web UI also has other tabs for showing error instances. It has charts which shows the response and requests details with time. It has error tab which shows the error occurrences along with the trace back. It also shows exceptions that occurred along with the trace back of the exception. It also has the option to download data of entire session in excel file. 5.3 New Relic analysis of performance The App side response along with time taken by each component is recordedbyNewRelic.NewRelicmonitors the performance of application and displays it in user friendly UI. Application needs to be integrated with New Relic to see the application’s performance. In the figure 2 there is an instance of New Relic graphical representation of performance. It has breakdown of application’s response time with various components of app. It is easy to analyse which components needs to be optimized. So while running scale and load test, New Relic data was monitored to see the bottlenecks in the app performance.
  • 4. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 07 | July 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 2632 Fig -2: New Relic results. 6. CONCLUSION Developed framework for testing micro-service was used to test notification micro-service. The framework could generate load up to 2000 Requests per second per docker container developed. Detailed framework for testing of functionality and load was mentioned.Fortestingscale1pod to 3 pod configurations were load tested. A system break point was considered when the response time breached 500 milliseconds. Throughput of system for these 3 configurations was tested. ACKNOWLEDGEMENT The authors thank Somesh Nandi for the collaboration of preparing this paper and also Hewlett Packard Enterprise for providing opportunity to work in this area. REFERENCES [1] Virender Ranga and Anshu Soni. “API Features Individualizing of Web Services: REST and SOAP”. In: International Journal of Innovative Technology and Exploring Engineering 8 (Aug. 2019). DOI: 10.35940/ ijitee.I1107.0789S19. [2] Festim Halili and Erenis Ramadani. “Web Services: A Comparison of Soap and Rest Services”. In: Modern Applied Science 12 (Feb. 2018), p. 175. DOI: 10.5539/ mas.v12n3p175. [3] Joel L. Fernandes et al. “Performance evaluation of RESTful web services and AMQP protocol”. In: 2013 Fifth International ConferenceonUbiquitousandFuture Networks (ICUFN). 2013, pp. 810–815. DOI: 10.1109/ ICUFN.2013.6614932. [4] Ambar Prajapati.“AMQP and beyond”.International Conference on Smart Applications,Communicationsand Networking (SmartNets). 2021, pp. 1–6. DOI: 10.1109/SmartNets50376.2021. 9555419. [5] Kyrylo Malakhov, Oleksandr Kurgaev, and Vitalii Velychko. “Modern RESTful APIDLsandframeworksfor RESTful web services API schema modeling, documenting, visualizing”. In: International Journal of Advanced Research in Computer and Communication Engineering (Nov. 2018).