Group 10: Failed tests
Git repository: https://git.rwth-aachen.de/david.kierdorf/sqa-ticketing-system
-------------------------------------------------------------------------------
Test set: de.rwth.swc.sqa.AddCustomerTest
-------------------------------------------------------------------------------
Tests run: 19, Failures: 12, Errors: 0, Skipped: 0, Time elapsed: 27.389 s <<< FAILURE! - in de.rwth.swc.sqa.AddCustomerTest
whenInvalidInput_shouldReturnBadRequest{Long, String, Boolean}[1] Time elapsed: 7.614 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <400> but was <201>.
at de.rwth.swc.sqa.AddCustomerTest.whenInvalidInput_shouldReturnBadRequest(AddCustomerTest.java:38)
whenInvalidInput_shouldReturnBadRequest{Long, String, Boolean}[3] Time elapsed: 0.051 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <400> but was <201>.
at de.rwth.swc.sqa.AddCustomerTest.whenInvalidInput_shouldReturnBadRequest(AddCustomerTest.java:38)
whenValidInput_shouldReturnSaved_andCorrectIds{String, Boolean}[1] Time elapsed: 0.157 s <<< FAILURE!
org.opentest4j.AssertionFailedError:
expected: <class Customer {
id: 3
birthdate: 2022-05-01
disabled: true
}> but was: <class Customer {
id: 5
birthdate: 2022-05-01
disabled: true
}>
at de.rwth.swc.sqa.AddCustomerTest.whenValidInput_shouldReturnSaved_andCorrectIds(AddCustomerTest.java:69)
whenValidInput_shouldReturnSaved_andCorrectIds{String, Boolean}[2] Time elapsed: 0.051 s <<< FAILURE!
org.opentest4j.AssertionFailedError:
expected: <class Customer {
id: 3
birthdate: 2022-05-02
disabled: false
}> but was: <class Customer {
id: 6
birthdate: 2022-05-02
disabled: false
}>
at de.rwth.swc.sqa.AddCustomerTest.whenValidInput_shouldReturnSaved_andCorrectIds(AddCustomerTest.java:69)
whenValidInput_shouldReturnSaved_andCorrectIds{String, Boolean}[3] Time elapsed: 0.054 s <<< FAILURE!
org.opentest4j.AssertionFailedError:
expected: <class Customer {
id: 3
birthdate: 2022-05-03
disabled: false
}> but was: <class Customer {
id: 7
birthdate: 2022-05-03
disabled: false
}>
at de.rwth.swc.sqa.AddCustomerTest.whenValidInput_shouldReturnSaved_andCorrectIds(AddCustomerTest.java:69)
whenValidInput_shouldReturnSaved_andCorrectIds{String, Boolean}[4] Time elapsed: 0.057 s <<< FAILURE!
org.opentest4j.AssertionFailedError:
expected: <class Customer {
id: 3
birthdate: 2022-05-04
disabled: false
}> but was: <class Customer {
id: 8
birthdate: 2022-05-04
disabled: false
}>
at de.rwth.swc.sqa.AddCustomerTest.whenValidInput_shouldReturnSaved_andCorrectIds(AddCustomerTest.java:69)
whenValidInput_shouldReturnSaved_andCorrectIds{String, Boolean}[5] Time elapsed: 0.055 s <<< FAILURE!
org.opentest4j.AssertionFailedError:
expected: <class Customer {
id: 3
birthdate: 2022-05-05
disabled: false
}> but was: <class Customer {
id: 9
birthdate: 2022-05-05
disabled: false
}>
at de.rwth.swc.sqa.AddCustomerTest.whenValidInput_shouldReturnSaved_andCorrectIds(AddCustomerTest.java:69)
whenValidInput_shouldReturnSaved_andCorrectIds{String, Boolean}[6] Time elapsed: 0.049 s <<< FAILURE!
org.opentest4j.AssertionFailedError:
expected: <class Customer {
id: 3
birthdate: 2022-05-06
disabled: false
}> but was: <class Customer {
id: 10
birthdate: 2022-05-06
disabled: false
}>
at de.rwth.swc.sqa.AddCustomerTest.whenValidInput_shouldReturnSaved_andCorrectIds(AddCustomerTest.java:69)
whenValidInput_shouldReturnSaved_andCorrectIds{String, Boolean}[7] Time elapsed: 0.069 s <<< FAILURE!
org.opentest4j.AssertionFailedError:
expected: <class Customer {
id: 3
birthdate: 2022-05-07
disabled: true
}> but was: <class Customer {
id: 11
birthdate: 2022-05-07
disabled: true
}>
at de.rwth.swc.sqa.AddCustomerTest.whenValidInput_shouldReturnSaved_andCorrectIds(AddCustomerTest.java:69)
whenValidInput_shouldReturnSaved_andCorrectIds{String, Boolean}[8] Time elapsed: 0.052 s <<< FAILURE!
org.opentest4j.AssertionFailedError:
expected: <class Customer {
id: 3
birthdate: 2022-05-08
disabled: false
}> but was: <class Customer {
id: 12
birthdate: 2022-05-08
disabled: false
}>
at de.rwth.swc.sqa.AddCustomerTest.whenValidInput_shouldReturnSaved_andCorrectIds(AddCustomerTest.java:69)
whenValidInput_shouldReturnSaved_andCorrectIds{String, Boolean}[9] Time elapsed: 0.051 s <<< FAILURE!
org.opentest4j.AssertionFailedError:
expected: <class Customer {
id: 3
birthdate: 2022-05-09
disabled: false
}> but was: <class Customer {
id: 13
birthdate: 2022-05-09
disabled: false
}>
at de.rwth.swc.sqa.AddCustomerTest.whenValidInput_shouldReturnSaved_andCorrectIds(AddCustomerTest.java:69)
whenValidInput_shouldReturnSaved_andCorrectIds{String, Boolean}[10] Time elapsed: 0.048 s <<< FAILURE!
org.opentest4j.AssertionFailedError:
expected: <class Customer {
id: 3
birthdate: 2020-02-29
disabled: false
}> but was: <class Customer {
id: 14
birthdate: 2020-02-29
disabled: false
}>
at de.rwth.swc.sqa.AddCustomerTest.whenValidInput_shouldReturnSaved_andCorrectIds(AddCustomerTest.java:69)
-
whenInvalidInput_shouldReturnBadRequest
: Check their invalid input: They supply an ID when creating the customer. Fixed in #38 (closed). -
whenValidInput_shouldReturnSaved_andCorrectIds
: Have a look at their test. They seem to create new customers but check against the wrong ID
-------------------------------------------------------------------------------
Test set: de.rwth.swc.sqa.AddDiscountCardTest
-------------------------------------------------------------------------------
Tests run: 14, Failures: 6, Errors: 0, Skipped: 0, Time elapsed: 0.89 s <<< FAILURE! - in de.rwth.swc.sqa.AddDiscountCardTest
whenCustomerNotInList_shouldReturnNotFound Time elapsed: 0.04 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <404> but was <400>.
at de.rwth.swc.sqa.AddDiscountCardTest.addCard(AddDiscountCardTest.java:43)
at de.rwth.swc.sqa.AddDiscountCardTest.addCard(AddDiscountCardTest.java:38)
at de.rwth.swc.sqa.AddDiscountCardTest.whenCustomerNotInList_shouldReturnNotFound(AddDiscountCardTest.java:88)
checkOverlappingDiscountCards Time elapsed: 0.038 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <201> but was <400>.
at de.rwth.swc.sqa.AddDiscountCardTest.addCard(AddDiscountCardTest.java:43)
at de.rwth.swc.sqa.AddDiscountCardTest.addCard(AddDiscountCardTest.java:38)
at de.rwth.swc.sqa.AddDiscountCardTest.checkOverlappingDiscountCards(AddDiscountCardTest.java:99)
whenValidInput_shouldReturnSaved_andDiscountCard{Long, Integer, String, ValidForEnum}[1] Time elapsed: 0.041 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <201> but was <400>.
at de.rwth.swc.sqa.AddDiscountCardTest.addCard(AddDiscountCardTest.java:43)
at de.rwth.swc.sqa.AddDiscountCardTest.addCard(AddDiscountCardTest.java:38)
at de.rwth.swc.sqa.AddDiscountCardTest.whenValidInput_shouldReturnSaved_andDiscountCard(AddDiscountCardTest.java:147)
whenValidInput_shouldReturnSaved_andDiscountCard{Long, Integer, String, ValidForEnum}[2] Time elapsed: 0.049 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <201> but was <400>.
at de.rwth.swc.sqa.AddDiscountCardTest.addCard(AddDiscountCardTest.java:43)
at de.rwth.swc.sqa.AddDiscountCardTest.addCard(AddDiscountCardTest.java:38)
at de.rwth.swc.sqa.AddDiscountCardTest.whenValidInput_shouldReturnSaved_andDiscountCard(AddDiscountCardTest.java:147)
whenValidInput_shouldReturnSaved_andDiscountCard{Long, Integer, String, ValidForEnum}[3] Time elapsed: 0.044 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <201> but was <400>.
at de.rwth.swc.sqa.AddDiscountCardTest.addCard(AddDiscountCardTest.java:43)
at de.rwth.swc.sqa.AddDiscountCardTest.addCard(AddDiscountCardTest.java:38)
at de.rwth.swc.sqa.AddDiscountCardTest.whenValidInput_shouldReturnSaved_andDiscountCard(AddDiscountCardTest.java:147)
whenValidInput_shouldReturnSaved_andDiscountCard{Long, Integer, String, ValidForEnum}[4] Time elapsed: 0.042 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <201> but was <400>.
at de.rwth.swc.sqa.AddDiscountCardTest.addCard(AddDiscountCardTest.java:43)
at de.rwth.swc.sqa.AddDiscountCardTest.addCard(AddDiscountCardTest.java:38)
at de.rwth.swc.sqa.AddDiscountCardTest.whenValidInput_shouldReturnSaved_andDiscountCard(AddDiscountCardTest.java:147)
-
whenCustomerNotInList_shouldReturnNotFound
Check their used ID. If necessary, clarify what an invalid ID is: They use an invalid type for DiscountCards (1) in their request, therefore400
is correct. -
checkOverlappingDiscountCards
: Check their overlapping: They use an invalid type, therefore400
is correct. -
whenValidInput_shouldReturnSaved_andDiscountCard
: Check their tests: They use an invalid type, therefore400
is correct.
-------------------------------------------------------------------------------
Test set: de.rwth.swc.sqa.BuyTicketTest
-------------------------------------------------------------------------------
Tests run: 20, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 1.3 s <<< FAILURE! - in de.rwth.swc.sqa.BuyTicketTest
testDiscountCardDefaultValue{Boolean}[3] Time elapsed: 0.037 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <201> but was <400>.
at de.rwth.swc.sqa.BuyTicketTest.testDiscountCardDefaultValue(BuyTicketTest.java:64)
testStudentDefaultValue{Boolean}[1] Time elapsed: 0.058 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <201> but was <500>.
at de.rwth.swc.sqa.BuyTicketTest.testStudentDefaultValue(BuyTicketTest.java:83)
whenInvalidInput_shouldReturnBadRequest{String, String, ValidForEnum, Boolean, Boolean, Boolean, ZoneEnum}[6] Time elapsed: 0.033 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <400> but was <201>.
at de.rwth.swc.sqa.BuyTicketTest.whenInvalidInput_shouldReturnBadRequest(BuyTicketTest.java:100)
checkZoneCoverage Time elapsed: 0.128 s <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <C> but was: <A>
at de.rwth.swc.sqa.BuyTicketTest.checkZoneCoverage(BuyTicketTest.java:120)
-
testDiscountCardDefaultValue
: Check their test: Buying 1H Tickets with a discount card is not possible and400
is correct. -
testStudentDefaultValue
: We return a500
which should never happen. Definetly a bug. -
whenInvalidInput_shouldReturnBadRequest
: Check their invalid input: Birthdate is after validFrom, discussion needed (#46 (closed)) -
checkZoneCoverage
: Check if they got their Zones reversed: We return the requested zone, however Ticket should be valid in all zones. is a request with a zone set invalid? See #43 (closed).
-------------------------------------------------------------------------------
Test set: de.rwth.swc.sqa.GetDiscountCardsTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.153 s <<< FAILURE! - in de.rwth.swc.sqa.GetDiscountCardsTest
checkGetDiscountCards Time elapsed: 0.129 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <400> but was <404>.
at de.rwth.swc.sqa.GetDiscountCardsTest.checkGetDiscountCards(GetDiscountCardsTest.java:40)
-
checkGetDiscountCards
: Clarify what an invalid ID is: Everything which is not an integer (e.g. String, see #40 (closed)). They check for -10, which is clearly an Int and404
not found is the correct response.
-------------------------------------------------------------------------------
Test set: de.rwth.swc.sqa.ValidateTicketTest
-------------------------------------------------------------------------------
Tests run: 22, Failures: 9, Errors: 0, Skipped: 0, Time elapsed: 1.84 s <<< FAILURE! - in de.rwth.swc.sqa.ValidateTicketTest
whenInvalidInput_shouldReturnBadRequest{Long, ZoneEnum, String, Boolean, Long, Boolean}[1] Time elapsed: 0.035 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <400> but was <403>.
at de.rwth.swc.sqa.ValidateTicketTest.whenInvalidInput_shouldReturnBadRequest(ValidateTicketTest.java:107)
whenInvalidInput_shouldReturnBadRequest{Long, ZoneEnum, String, Boolean, Long, Boolean}[2] Time elapsed: 0.033 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <400> but was <403>.
at de.rwth.swc.sqa.ValidateTicketTest.whenInvalidInput_shouldReturnBadRequest(ValidateTicketTest.java:107)
whenInvalidInput_shouldReturnBadRequest{Long, ZoneEnum, String, Boolean, Long, Boolean}[3] Time elapsed: 0.035 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <400> but was <403>.
at de.rwth.swc.sqa.ValidateTicketTest.whenInvalidInput_shouldReturnBadRequest(ValidateTicketTest.java:107)
whenInvalidInput_shouldReturnBadRequest{Long, ZoneEnum, String, Boolean, Long, Boolean}[4] Time elapsed: 0.035 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <400> but was <403>.
at de.rwth.swc.sqa.ValidateTicketTest.whenInvalidInput_shouldReturnBadRequest(ValidateTicketTest.java:107)
whenInvalidInput_shouldReturnBadRequest{Long, ZoneEnum, String, Boolean, Long, Boolean}[5] Time elapsed: 0.036 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <400> but was <403>.
at de.rwth.swc.sqa.ValidateTicketTest.whenInvalidInput_shouldReturnBadRequest(ValidateTicketTest.java:107)
whenDateNotInTicketDuration_thenReturnForbidden Time elapsed: 0.115 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <200> but was <403>.
at de.rwth.swc.sqa.ValidateTicketTest.whenDateNotInTicketDuration_thenReturnForbidden(ValidateTicketTest.java:133)
checkDiscountCardTicketOnlyUsableWithDiscountCard Time elapsed: 0.1 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <201> but was <400>.
at de.rwth.swc.sqa.ValidateTicketTest.checkDiscountCardTicketOnlyUsableWithDiscountCard(ValidateTicketTest.java:184)
checkDateInDiscountCardDuration Time elapsed: 0.101 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <201> but was <400>.
at de.rwth.swc.sqa.ValidateTicketTest.checkDateInDiscountCardDuration(ValidateTicketTest.java:229)
checkStudentTicketOnlyUsableAsStudent Time elapsed: 0.144 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <403> but was <200>.
at de.rwth.swc.sqa.ValidateTicketTest.checkStudentTicketOnlyUsableAsStudent(ValidateTicketTest.java:302)
-
whenInvalidInput_shouldReturnBadRequest
: Check their invalid input. What do we define as invalid input? Clarify if necessary: Invalid Date formats used, correct status code is discussed in #45 (closed) -
whenDateNotInTicketDuration_thenReturnForbidden
: Check their test: a 1h ticket bought at exactly 22:00:00 should NOT be valid at 23:00:00, therefore403
is correct. -
checkDateInDiscountCardDuration
: They expect an201
(seems odd): They create a discount card, but with invalid type. -
checkStudentTicketOnlyUsableAsStudent
: Seems like non-students can use student tickets: Is a bug (see #47 (closed)). Check is off by one.
Edited by Jasper vom Felde