"...test data independant" (from post last week)
What do I mean by that ?
In automation, I try to avoid hard-coded test data which depends on whether the AUT database is in "start-position" or not.
Mostly I create test data during run-time using random values or getting random data from the AUT database which match my critera for the specific test case.
Consider a test case where you want to change an address for example. Here is an approach you could use (in pseudo-code]:
Select top 1 [myAddressColumns] from ADDRESS where [myCritera = True] order by newid() 'Note! Newid() MS SQL Server specificOptional
If blnNoAddressFound Then call createAddress 'In case of empty database call test case/method for create an address
Advantages:
Test case can be executed to any AUT database (empty or full)
You get test data variation using random values
Disadvantages:
It is more difficult to implement compare methods (but not impossible)
WAIT#2 Call for Participation
-
The Workshop on AI in Testing (WAIT) #2 WAIT is a small, two-day, online,
non-commercial, LAWST-style peer conference. Facilitator Jon Bach Content
Owner...
2 weeks ago
No comments:
Post a Comment