Skip to content

Insights

Automating tests in Oracle E-Business Suite

Patch week. A room of business users works through printed test scripts, ticking each step by hand. It is the fourth time this year.

OracleTest

I have been in that room. It has a particular atmosphere. The accounts payable supervisor is there, and two buyers, and someone from the warehouse who would plainly prefer to be in the warehouse. Each has a stapled script. Step 14: enter the supplier number. Step 15: confirm the site defaults. Tick. They did this in March, and in June. Nothing went wrong either time, which is exactly why it is so hard to stay awake.

And that is the real danger of manual regression testing. Not the cost, though it costs plenty. It's that people are poor at doing the same thing the fortieth time. Somewhere around step 30 the mind wanders and the tick goes on regardless. The test that is skipped is, by a law I cannot prove but firmly believe, the one that would have failed.

A machine does not get bored. That is the whole case for automation, and it is a strong one. But I have seen it go wrong nearly as often as right, and always in the same way, so let me describe the tool and then the trap.

What the suite is

Oracle Application Testing Suite (OATS) is Oracle's own set of testing tools, and it comes in three parts. OpenScript is where tests are made. You switch on a recorder, work through a transaction in Oracle E-Business Suite as a user would, and it writes down what you did as a script that can be played back. It understands the Oracle Forms screens that much of E-Business Suite is built from, which general-purpose web testing tools tend to choke on. Oracle Test Manager is the filing cabinet: test cases, the requirements they prove, the runs, the defects. And Oracle Load Testing takes the same scripts and plays them as hundreds of users at once, to see what the system does on its busiest day.

So far, so sensible. You record your forty-step payables test once. In the next patch week the machine runs it at two in the morning and the supervisor stays at her desk.

The trap

Here is what happens next, at a company I will not name because it could be any of a dozen.

Recording is easy and rather fun. In the first enthusiasm a team records everything. Three hundred scripts in two months. There is a slide with a rising line on it. Then the patch arrives, the scripts are run, and a hundred and forty fail.

The application is fine. A field moved on a form. A supplier the script relied on was made inactive. The script enters an invoice dated in a period that has since been closed. A list of values now has one more entry and the script picks the wrong row. Each failure has to be looked at by a person, to find out whether it is the system that is broken or the test. Mostly it is the test.

After two rounds of this nobody trusts the scripts. The printed ones come back out. The automation is described, in the lessons-learned meeting, as something that "did not work for us".

But it wasn't the tool. The team had mistaken a recording for a test. A recording is a diary of what one person did on one day with one set of data. A test is a small piece of software, and has to be built like one. It takes its data from outside and does not have it typed into the steps. It creates the invoice it is going to pay, and does not assume one is lying about. It is made of parts (log in, find a supplier, enter an invoice) that are written once and reused, so that when a form changes there is one place to mend and not sixty. OpenScript allows all of this. It does not insist on it, and the recorder positively invites you to skip it.

Fewer, and built to last

So my advice runs against the rising line. Automate less than you can.

Start with the handful of flows that would stop the business if they broke: an order through to its invoice, a purchase through to payment, the period close. Build those properly, with their own data and shared parts. Run them not only in patch week but every week, so that when one fails it is news, and somebody looks the same day. Twenty tests that everybody believes are worth more than three hundred that cry wolf.

Leave the rest to people, and I mean that as praise. A person is a bad repeater and a very good noticer. New functionality, an odd-looking total, a screen that is technically correct and impossible to use: these want a human, awake, who has not just ticked 39 boxes.

And give the scripts an owner. They are an asset, like the customisations they protect, and they need a name beside them, a place under version control and a few hours each month. It is the first thing I would settle when planning automated testing for an ERP release, since a suite nobody maintains has about a year in it.

The payables supervisor, when her forty steps were finally automated, was asked what she would do with patch week. She said she would test the things she had always been worried about, and never had time for.

Which is what testing is for.

Twenty tests everybody believes

Tell us which E-Business Suite flows you retest by hand on every patch. We will say which to automate first, and which to leave to people.