Lesson 2 of 5
Data independence
9 min
Twelve Contoso testers start UAT on Monday morning. By 10:00, three of them are reporting defects that are not defects. One tester's order was delivered by another tester. A customer that should pass the credit check is blocked because another scenario used up its limit. Stock that should be there was issued by a colleague in a different scenario. This is what shared test data does.
How shared data breaks tests
| Shared record | What one tester does | What the other tester sees |
|---|---|---|
| Customer Great Lakes Fleet Services | Runs the credit block scenario and pushes exposure over the limit | A standard order is unexpectedly credit blocked |
| Stock of CMC-ALT-100 in 171A | Issues 60 units for a large order | Goods issue fails for lack of stock |
| Purchase order 4500002210 | Posts a goods receipt for the full quantity | Their receipt is rejected because nothing is left open |
| Product master | Changes the MRP type to test a variant | Planning results change for every other planning scenario |
Each of these produces a false failure (a "defect" that is only a data clash) or, worse, a false pass. False failures waste the defect team's time and erode trust in testing. False passes hide real problems. Both are avoidable.
Ways to keep data independent
- Dedicated records per tester or per scenario. Each tester gets their own customers, suppliers and purchase orders. Create them in a batch before the cycle starts.
- Tagging. Mark test records so everyone can see whose they are. For business partners, a search term such as UAT-O2C-MARIA works well and is easy to filter.
- Separate stock buckets. Use separate storage locations, or separate products that behave identically, when several testers need stock of the same item. Contoso gives O2C testers 171A and production testers 171B.
- Never change shared master data during a test. If a scenario needs a different product setting, create a dedicated product for it.
- Consume-once data. Treat data that a scenario uses up (stock, open orders, open items) as consumed and plan enough for retests.
- Inventory the needsCollect data needs from every scenario in the cycle
- Group by ownerAssign data ranges or tags to each tester or scenario
- Size for retestsPlan at least two extra sets for scenarios likely to be rerun
- Create in bulkCreate records before the cycle with a mass upload or a scripted setup
- Publish the data sheetGive each tester their own records and nothing else
Copying a reference record
The fastest way to create many similar records is to build one good reference record and copy it. For business partners, the customer role data, sales area data and tax classification come along; for products, the views and plant data. Check what the copy does not carry over (condition records, credit data and stock are separate objects) and add those to the setup script. Keep the reference record itself read-only, and never use it in a scenario, so that every copy starts from the same known state.
If your project uses internal number assignment, you will not control the numbers of new business partners. That is fine. Rely on the search term tag and record the generated number in the data sheet as soon as the record is created.
When data has to be shared
Some data cannot be duplicated: there is one company code, one controlling area, one set of G/L accounts. Integration scenarios also deliberately share data, because one team's output is the next team's input. In those cases, agree the sequence and ownership explicitly: who creates the record, who consumes it, and when. That is the subject of the integration testing course.
What would you do?
Two Contoso testers share customer Great Lakes Fleet Services. One runs a credit block scenario; the other runs a standard order and it is blocked. The second tester raises a defect against credit management. What is the right response?
- Shared data creates false failures and false passes.
- Give each tester or scenario dedicated, tagged records, created before the cycle.
- Separate stock by storage location or product, and never change shared master data mid-test.
- Plan extra data sets for retests; consumed data is gone.
Check your understanding · not graded
Lesson check
1. Two testers share the same customer and one blocks it for credit. What problem does this illustrate?
2. Why tag test business partners with a search term such as UAT-O2C-MARIA?
3. A scenario needs a product with a different MRP type. What should the tester do?
4. Why plan extra data sets for scenarios likely to be rerun?