-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathScriptPerformanceTests.txt
More file actions
25 lines (25 loc) · 1.42 KB
/
ScriptPerformanceTests.txt
File metadata and controls
25 lines (25 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
1) Go to https://github.com/dipina/SpringBootLibrary
2) git clone https://github.com/dipina/SpringBootLibrary
3) Open command prompt in the directory SpringBootLibrary
4) code .
5) start mysql, in my case: mysqld
6) In a terminal in Visual Studio code:
mvn -Pperformance integration-test
7) Visit the stats in a webpage generated by JUnitPerf 5:
target/reports/perf-report.html
8) Check contents of pom.xml, search for "perf":
- note code to declare JUnitPerf dependency
- note XML code to exclude performance directory for executing tests when invoking mvn test
- note XML code to declare a profile to launch performance tests
9) Check code in file com.example.restapi.performance.PerformanceTest
- check documentation of JUnitPerf at https://noconnor.github.io/JUnitPerf/docs/junit5.html
- check meaning of attributes in JUnitPerf at https://github.com/noconnor/JUnitPerf
10) Run the performance test with command:
mvn -Pperformance integration-test
11) Notice that there is an integration test at file:
com.example.restapi.integration.LibraryIntegrationTest
- Read the JavaDoc for https://docs.spring.io/spring-boot/api/java/org/springframework/boot/test/web/client/TestRestTemplate.html
- Read the JavaDoc for https://docs.spring.io/spring-framework/docs/6.2.x/javadoc-api/org/springframework/web/client/RestTemplate.html
- Study implementation of testUserBorrowsAndReturnsBook
12) Run the integration test:
mvn -Pintegration integration-test