nus-cs2103-AY2425S1 / forum

12 stars 0 forks source link

Equivalence Partitioning #560

Closed JagdeepSinghNUS closed 4 days ago

JagdeepSinghNUS commented 5 days ago

Just to check, for the forth example ["F"], why can't "E" or "G" or perhaps "f" be considered a specific boundary to test?

Screenshot 2024-10-23 at 12 39 28 PM
damithc commented 5 days ago

Good question @JagdeepSinghNUS Let's wait to see what others have any thoughts on a possible explanation..

shotnothing commented 5 days ago

I think it depends on the context, but 'E' and 'F' are not really adjacent in any sense other than ascii code (and I don't think it's common to use the ascii code form in a for-loop for example), so I couldn't consider them boundaries.

Incogdino commented 4 days ago

In my opinion, there is no clear boundaries specified by the equivalence partition for this case (as well as the one for prime numbers and "A", "D", "X"). I think for one to do boundary value analysis, the equivalence partition needs to have a continuous range of values for us to properly define a boundary.

Perhaps testing "E", "F" and "G" falls under a different name of testing.

JagdeepSinghNUS commented 4 days ago

Nice, I now have a better understanding of this, thanks :)

damithc commented 4 days ago

Good answer @Incogdino @JagdeepSinghNUS Strictly speaking, we can't be 100% sure without further contextual info but it is unlikely E and G are adjacent to F in a way that the programmer makes an 'off by one' mistake to accept them instead of F (which is the type of errors boundary values catch). f is certainly a good test case, but we can't call it a boundary value.