Para español, haga clic aquí 🇪🇸
Test report using Allure and JUnit5
Share the experience using Allure
Built with
Payment
@Feature("Payment")
class PaymentServiceTest {
@Test
@DisplayName("Debit and transfer funds")
@Severity(SeverityLevel.BLOCKER)
void debitAccountAndTransferFunds() {
double amount = 42;
service.debitAccountAndTransferFunds(buyer, seller, amount);
verify(buyer, atLeastOnce()).balanceOperation(Operation.DEBIT, amount);
verify(seller, atLeastOnce()).balanceOperation(Operation.CREDIT, amount);
}
@Test
@DisplayName("Prepare for payment")
@Severity(SeverityLevel.NORMAL)
void prepareForPayment() {
Throwable throwable =
assertThrows(
UnsupportedOperationException.class,
() -> service.prepareForPayment());
assertNull(throwable.getMessage());
}
}
- Download the project through the GitHub using
git clone https://github.com/luizgustavocosta/bcn-jug-allure-junit5.git
- Fix the failed test on InMemoryStoreTest class, if any.
@Test
@Severity(SeverityLevel.TRIVIAL)
void findAll() {
assertNotNull(null);
}
- Go to project folder
cd bcn-jug-allure-junit5
- And then execute
mvn clean verify allure:serve
- A new page will be open showing the report