January 2018
Beginner to intermediate
354 pages
7h 59m
English
Using property files in development is fairly common and simple to do. In some development environments, actual confirmation and exception messages are stored in confirmation.properties and exception.properties files. In those files, there is usually a code=message pairing for each type of message and those are pulled on the fly when specific actions are performed in the application. Dynamic data can be stuffed into them also by using a placeholder in the file. The same model can be used in testing them.
So, instead of storing the confirmation and exception messages in the test data, create two files to store them in and pass in the corresponding code to the test method:
// confirmation.properties001=User account was successfully ...
Read now
Unlock full access