tests » Reasons why we aren't writing the tets » Bugs vs tests » How not to write tests with success » Selling tests Lost in maintenance, by Paul Taykalo, #SE2017 3
High overfitting chance » Less tend to be fragile, Have the biggest value » Often SUT is not correctly selected Lost in maintenance, by Paul Taykalo, #SE2017 28
String let name: String let address: String let friends: [User] let dogName: String? let hairStyle: HairStyle ... } Lost in maintenance, by Paul Taykalo, #SE2017 48
the user struct UserError { let title: String let message: String // just in some really rare cases let underlyingError: Error } Lost in maintenance, by Paul Taykalo, #SE2017 51
let name: String? let lastName: String? } struct User { let id: String let name: String let lastName: String } Lost in maintenance, by Paul Taykalo, #SE2017 52
images is verify(images: images, onSuccess: { verified, unverified is verifyDeletion(images: unverified, onSuccess: { shouldDelete in }, onFailure: { // TODO Handle it print(error) }) }, onFailure: { // TODO Handle it print(error) }) }, onFailure: { // TODO Handle it print(error) }) }, onFailure: { // TODO Handle it print(error) }) Lost in maintenance, by Paul Taykalo, #SE2017 56
{ images in verify(images: images)}) .flatMap { verified, unverified in askForDeletion(images: unverified)} .filter { shouldDelete in deleteImages(shouldDelete) } Lost in maintenance, by Paul Taykalo, #SE2017 57
show/require all data » Layer things out » Don't allow invalid data » Semantic meaning » Linear flow » Decrease amount of possible states Lost in maintenance, by Paul Taykalo, #SE2017 59
about testing and types of testing » Try to test-first, try to test-last » Determine your core » Isolate features and test them » Start with Unit tests » For Custom UI you can run snapshot testing Lost in maintenance, by Paul Taykalo, #SE2017 61
» Notify client about changes » Have support plan (include support as an option) » Always assume your code is not working -- prove it otherwise! » It's not fixed until it's checked (see tests) » Acceptance rules (Hard case) Lost in maintenance, by Paul Taykalo, #SE2017 68