bloomberg / bloomberg/blazingmq-sdk-java
Proposal: TestScope helper
- Dominant language
- Java
- Stars
- 34
- Forks
- 19
- Avg merge
- 7h
- Merged PRs (30d)
- 27
Description
### Is there an existing proposal for this?
- [X] I have searched the existing proposals
### Is your feature request related to a problem?
We have a lot of lines like this:
```
logger.info("==============================================");
logger.info("BEGIN Testing SessionIT queue flush down.");
logger.info("==============================================");
```
We might want to standartize this to avoid errors.
### Describe the solution you'd like
I propose to make a helper class for this, the usage should look like this:
```
class ComponentIT {
public testStress() {
TestScope scope = new TestScope(this, "testStress");
// should log:
// ==================================
// #BEGIN_TEST ComponentIT testStress
// ==================================
scope.step("Open session");
// should log:
// #STEP 1. Open session
scope.step("Close session");
// should log:
// #STEP 2. Close session
scope.end();
// should log:
// ==========================================
// #END_TEST ComponentIT testStress - 13.21 s
// ==========================================
}
}
```
### Alternatives you considered
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.