-
Create a new workspace at Gitpod. This usually takes a little while, just be patient.
-
Open ApplicationTest from the file tree on the left and wait for the Java installation to finish.
A box will appear on the bottom right, saying Opening Java Projects, you can click on check details to follow the installation progress.
-
After the installation is done, you can right-click into the code, and select Run test at Cursor (to run a single test) or Run Tests in Current File (to run all tests).
classDiagram
direction LR
class Application {
<<springBootApplication>>
}
namespace unicorn {
class Unicorn {
<<record>>
-id: UUID
-name: String
-maneColor: ManeColor
-hornLength: Integer
-hornDiameter: Integer
-dateOfBirth: LocalDate
}
class ManeColor {
<<enumeration>>
}
class UnicornController {
<<controller>>
}
class UnicornService {
<<service>>
}
class UnicornRepository {
<<repository>>
}
}
UnicornController --o UnicornService
UnicornService --o UnicornRepository
UnicornController -- Unicorn
UnicornService -- Unicorn
UnicornRepository -- Unicorn
Unicorn --* ManeColor
Feel free to use the Cheat Sheet for inspiration.
-
Have a look at the ApplicationTest.
Brainstorm: Which problems do you see?
-
Do you understand what's being tested?
-
Is there a proper arrange, act, assert structure in the test cases?
-
Are the names of test cases and variables consistent?
Does it help to understand implications of failures?
Does it help to find the corresponding code?
-
Do you understand how the test works technically?
-
Do you see where the test data is coming from?
-
Which code duplications do you find?
How would you reduce them?
-
Are the Test Code Quality Criteria applied?
-
-
Ensemble: Let's untangle it!
-
Have a look at the test at UnicornServiceTest, UnicornControllerTest and UnicornTest.
Brainstorm: Which problems do you see?
-
Which layer of the testing pyramid is this test on?
Is the layer appropriate for the test cases? Can we move tests here?
-