0

Can you give examples of a Test Plan for a PR

Profile picture
Senior Software Engineer at Mystery Companya month ago

Hello,

I like your idea of a Test Plan for a Pull Request, would you please be able to provide an example so I can use it at my work.

Thanks,

Param

43
3

Discussion

(3 comments)
  • 0
    Profile picture
    Senior Software Engineer @FocusConsulting
    a month ago

    I really like testing plans and generally follow a simple framework based on principles I’ve learned from others and insights I’ve heard from folks here at Taro.

    I find that a testing plan should enable other engineers, even those with less context about your PR, to validate that it works as expected. This doesn’t necessarily mean you’re okay with an approval from someone without context. Regardless this is the principle:

    If you can create a testing plan that lets a new team member with a fresh codebase validate your changes, it builds huge confidence for folks who are knowledgeable about the problem / feature.

    So with that in mind, there’s no one-size-fits-all solution. However, following the principle mentioned above will guide you toward something like this:

    -----
    Testing Plan

    Automated

    1. Ensure docker is running
    2. Run bash e2e.sh ... whatever your e2e, integration, or high value unit tests are
    3. Make reference to the tests in the diff

    Insert screen shots of passing -> also point to passing in the CICD pipeline

    Manual

    1. Ensure docker is running
    2. $ bash startup.sh test
    3. Navigate to localhost:3000/xxxx
    4. Do X Y Z
    5. "Expect this thing to look like this"
    6. Attempt edge case: Insert "some edge case" and expect "plan product requirement outcome"

    Include screen recording of manual steps or screenshots
    -----

    Hopefully this helps!

    • 0
      Profile picture
      Senior Software Engineer [OP]
      Mystery Company
      a month ago

      Thank you Iverson, this is helpful. I plan to implement this at my company also.

    • 0
      Profile picture
      Thoughtful Tarodactyl
      Taro Community
      a month ago

      Hey Iverson, do you still think this is necessary if the tests are fully automated/included in the repo? I would think repo-wide docs on how to run the tests should cover this, then anyone can read the tests you have. In any mature organization, builds passing should prove the tests all passed, so it's just a matter of whether the tests appear to be written correctly.