View source | Discuss this page | Page history | Printable version   

Display Logic Testing



It is possible to check display logic of the application. QA team provides this feature to assert Display Logic in ERP.

Display logic types

There are three different kind of verifiable Display Logic groups:

Display logic test template

The following is a template that shows how a simple Display Logic test is created. Much more complex tests can be created from this simple template.

Testlink template

Automated test code template

Definition of the parameters

  public static Collection<Object[]> purchaseOrderDisplayLogic() {
    return Arrays.asList(new Object[][] { {
        new PurchaseOrderHeaderData.Builder().businessPartner(
            new BusinessPartnerSelectorData.Builder().value("VA").build()).build(),
        new PurchaseOrderHeaderDisplayLogic.Builder().organization(true).transactionDocument(true)
            .documentNo(true).deliveryNotes(false).build() } });

The following code creates the record and the next action asserts the Display Logic.

   * Test the display logic of the PurchaseOrderHeader
  public void PROa_createPurchaseOrderAndInvoice() {"** Start of test case PurchaseOrderHeaderDisplayLogic. **");
    final PurchaseOrder purchaseOrder = new PurchaseOrder(mainPage).open();
    purchaseOrder.assertDisplayLogicVisible(purchaseOrderHeaderDisplayLogic);"** End of test PurchaseOrderHeaderDisplayLogic. **");

This fragment of code shows how Display Logic is managed. (In this certain case, visibility).

   * Assert display logic visibility
   * @param visibleDisplayLogic
   *          DataObject with the fields whose visibility has to be asserted.
  public void assertDisplayLogicVisible(DataObject visibleDisplayLogic) {
    for (final String key : visibleDisplayLogic.getDataFields().keySet()) {
      if (visibleDisplayLogic.getDataFields().get(key).equals(true)) {
        assertTrue(key + " is not visible", this.getForm().getSection(key).isVisible());
      } else {
        assertFalse(key + " is visible. It shouldn't", this.getForm().getSection(key).isVisible());

Retrieved from ""

This page has been accessed 3,946 times. This page was last modified on 1 March 2016, at 12:09. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.