Country or region and language

    Choose your country or region and your language.

    Suggested for you

      All countries and regions

        Choose your character

        It shows in the top bar and on your profile. Change it any time.

        Software testing course

        Boundary value analysis

        Opening Software testing
        Your turn

        Boundary value analysis

        Test the limit and its neighbors

        Off-by-one bugs live at the edge of a rule: < written as <=, overtime counted from the second hour, the last page dropped when it is only partly full. Boundary value analysis tests the limit itself and the value one step either side. For “reorder when stock is below the minimum”, that means the minimum (no reorder) and one below it (reorder). A value far from the limit gives the same answer in the correct code and in the broken one, so it proves nothing about the boundary.

        How the exercises check your tests

        Each task gives you a small Python module and its contract. You write pytest tests, and they run against the correct module and two versions with one boundary bug each. The suite passes only when it accepts the correct code and fails both broken versions through an assertion. Hidden checks change the module’s limits, so write subject.MINIMUM - 1, not a copied number. The lesson before this one covers equivalence partitioning, which decides which groups of inputs need a test.

        Your Work Gym account

        Save your progress and pick up on another device. Your browser's progress comes with you.

        New accounts get 12 hours of full access: every course, unit, project and exam. The clock starts when you open your first lesson.

        Plan your practice from a job ad or syllabus

        Have a referral code?

        or

        You can keep practicing without an account.

        Change your plan

        Checking the price

        Help and feedback

        Ask a question, tell us what is not working, or share an idea. We reply by email.

        What is it about?

        We use it only to reply to you.