Blog

I’m sorry. Can you repeat that?

by Denis Tishchenko

The repeater function in the latest release of Dimension SwifTest™ has helped many users transform the way they carry out functional testing for JD Edwards EnterpriseOne. In this article DWS Technical Project Manager, Denis Tishchenko, takes us through how it works.

It’s quite common for any organization to have different scripts for different companies, business users or suppliers that are either the same or fairly similar.

For example, one of our customers has about 50 companies to manage. Some of them use standard P0411 to create a voucher, some of them use custom versions of P0411 – like P550411 – with similar fields and similar processes in general.

Usually, it would be necessary to create these scripts manually, or at best semi-automatically, for each company. However, using SwifTest, they created one single script and an Excel-like repository, soft-coding all the information that is different for each company, then ran the script over the repository data. Effectively, they have created 50 separate scripts from the original.

This is a very powerful approach, because scripts are typically created and supported by business analysts, not developers. Analysts feel more comfortable managing one single script than fifty similar (but different) scripts. Also, updating repository data in excel, or something similar, is a more familiar process – it’s quite common to use Excel for the data and just paste it to the SwifTest Repository before a test.

Let’s have a look at an example. Here, we’ll enter and receive two purchase orders for two different companies. One company will be using standard P4310, the other will use a customized P594310. Remember, we’ll only need one script, not two.

We’re going to need two repositories for this. The first is the header, which will store both the technical information (like the program ID and the version ID) and also header level information, like the business unit and the supplier:

This can be changed at any time. For example, extra lines can be added so we can test other clones of P4310, or other suppliers. Maintaining this table doesn’t require any programming skills. Data can even be kept in Excel and pasted to the repository as needed. In fact, many of our customers do exactly this.

Please note, there are two columns to be populated at runtime by the script – PO Number and PO Amount.

The other repository we’re going to need is the detail level information; which will contain the lines of the purchase order. We want to make this as flexible as possible, allowing us to have any number of detail lines for each company. So, the number of lines for each purchase order is also stored in the header. Here’s an example of how the details might look:

This design is a little bit minimalistic. In real life you’ll want to add other information to both the header (like payee, supplier references) and the details (like tax information, etc.), but this works for illustrative purposes. Additional fields could always be added in the future.

Here’s the script, which is the same for both companies. The beauty of repeater is that once you’ve created your initial scripts, no matter how complex, it’s all downhill from there.

To execute this, we will need to create a queue. Here’s how the queue looks:

I’ve made a short video clip that demonstrates how the queue works > Click here to watch the queue in action

After that, the header repository is updated with both the purchase order numbers and their values, which are calculated after the POs have been created.

If you need to add a third, fourth or fifth company to your tests you don’t need to modify the script at all, you just need to add the appropriate records to the header and details repository.

The repeater can also be used for other repetitive tasks, like closing the period for many companies at the same time.

All in all, repeater is a simple but powerful feature that allows you to save time, both on script creation and maintenance. In fact, you no longer need to maintain multiple, similar scripts; just one script and its repositories.

If you have a little basic programming knowledge, repeater is going to be very simple to master. Even if you don’t, you’ll find it easy to use and be amazed at creating something so simple that can automate something so complex.

For more details on our JD Edwards EnterpriseOne test automation products, click here

DWS Logigear Logo
DWSLogo 257 x 191