Testing - marcinogo/robot GitHub Wiki

Konwencja pisania testów

Piszemy w konwencji Given When Then

Nazewnictwo testów

Testy jednostkowe:

W folderze ./src/test

@Test
public class NazwaTest{...}

Testy integracyjne:

W folderze ./src/test-integration

@Test
public class NazwaTestIT{...}

Nazwa dla pojedynczego testu:

should_expectedBehavior_when_stateUnderTest(){…​}

Przykłady:

should_throwException_when_ageLessThan18(){...};
should_failToWithdrawMoney_forInvalidAccount(){...};
should_failToAdmit_ifMandatoryFieldsAreMissing(){...};
⚠️ **GitHub.com Fallback** ⚠️