Loading huge volume of data into the database to carry out performance testing is a big challenge. Actual data in production may not available to either testers or developers due to privacy issues. So, only options left are populate the data by writing some test cases or sql scripts or go for filling the data manually.
There will be more challenges again in the filling up the data through test cases. Usually, we make use of loops to execute a piece of code that inserts data into various tables. But this data will be very much likely to be identical and not diverse as in real time. If we want to fill in diverse data junits should be more robust. Otherwise, with identical data, most of the queries or conditions in the code base will be by passed in all flows, and a holistic performance behavior of the code base cannot be known.
Once test data is filled, extracting that into some xml or similar files through some build targets is an option, if that is supported by the prevalent infrastructure of the project. Even the data dump options provided by databases such as oracle or db2 can also be used to pull out the same. Here, care should be taken to ensure that database versions of the source and destination are same.
It will be cumbersome, impractical and sometimes even risky to check the data table by table and extract data from only those tables required for testing. Typically in a enterprise project, database tables will be so closely interlinked that, we may end up needing data in most of the tables to account for data integrity. So, a better option is always to export data in the entire schema and them import the same.
If data is inserted through junits or scripts, it is more likely that it will have security errors with respect to creation and view of data. Because, junits or scripts do not cater to login authentication, authorization etc, instead dump some data into database just to test other functionality. If the same data is imported on test runtime where there will be more powerful security checks, there could be issues in logging into the application itself.
Despite all these issues, performance testing is very important and to conduct this it is equally important to set up a reasonable volume of data. How this can be achieved will always be an interesting question to the project architects.
Subscribe to:
Post Comments (Atom)
1 comments:
Hello friends,
Some data may be used in a confirmatory way, typically to verify that a given set of input to a given function produces some expected result. Other data may be used in order to challenge the ability of the program to respond to unusual, extreme, exceptional or unexpected input. Thanks.....
Post a Comment