0

I am testing a web-based application. One feature of this application is to accommodate customizable elements in a given region.

There are several regions:

  • Top
  • Top-left
  • Top-right
  • Items
  • Right
  • Bottom
  • Bottom-left
  • Bottom-right
  • Menu

There are a number of interactive elements that can be placed in some or all of the regions mentioned above, depending on their specifications. For example, some elements, like a timer element, can be placed in all regions, while others, like a calculator button, can only be placed in specific regions.

To test this feature comprehensively, I am considering a brute-force approach:

  • Place all applicable elements in a region and verify if they appear as expected. This would be a positive test scenario.

What about a negative test scenario?

  • Attempt to place all non-applicable elements in a region where they are not supposed to appear and verify that they do not appear.

Since this is for an end-to-end (E2E) test suite, I am contemplating whether having a negative scenario is truly necessary.

Any suggestions?

1
  • You have not said what test you are trying to build; I am assuming you are trying to do this using a UI test. Sometimes you need to ask if the test your trying to do is best in the UI layer. Have you discussed this with your developers? Is there perhaps an oppurtunity to test these element rules lower down in the testing pyramid?
    – BernardV
    Commented Jul 11, 2023 at 6:47

1 Answer 1

1
Since this is for an end-to-end (E2E) test suite

Do you mean through the UI with everything else built and set up? Is this really necessary?

Most probably the different elements are represented by a class. You can simply have a suite of checks for the behavior of each object/class, verifying the placement error is raised for each bad placement (e.g. trying to place the calculator button outside the specified regions).

Then on the few places where you handle the generic placement error , e.g. in the UI, you can have checks.

The "E2E" approach grows by this formula:

(number of generic placement error points) * (number of elements) * (number of errors for each element)

While the above proposal grows by this formula:

(number of generic placement error points) + ((number of elements) * (number of errors for each element))

Meaning that it tends to take longer to run and require more coding.

Additionally, the proposal gives you more precise checks, where check fails will be raised by changes in a specific element or in the generic error handling. On the "E2E" approach, a check can fail by either changes in a specific element or in the generic error handling - thus increasing fragility and debugging time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.