Blog do projektu Open Source JavaHotel

poniedziałek, 29 lutego 2016

BoaTester. Netezza PDA, testing


 IBM PureData System Analytics, Netezza, is IBM warehouse solution for a huge volume of data. Netezza comes with a lot of tools, most commonly used is nzsql, command line tool. The nzsql command can be used as a typical REPL tool, for running ad-hoc queries and do managerial or administrative tasks and also a part of a broader solution, engine to run scripts and queries in batch mode. As it happens with development, a question arises how to test it, and, next step, how to create a suite of regression test to be sure that during maintenance, updates, bug fixing, the software still performs correctly

Assume that we developed a script doing very important stuff inside big PDA appliance. It could be backuping, user and groups synchronization with external user maintenance system, like Active Directory or LDAP, vacuuming, refreshing, moving data between databases, loading and transforming external data. The script covers several use cases and should run over a different combination of data. The script should be tested after every fix or introducing a new feature. It is a good idea to have this task automated to avoid tedious and mundane manual testing. Every test should start with a predefined precondition and finish with expected result. If the current result matches the expected result then the test passes otherwise test fails. All setup and verify task can be done as a single SQL statement or a nzsql script in case of more complex setting. So what is necessary is a test harness allowing run aforementioned tasks in a simple way.
So what I need is a test harness allowing executing the following tasks in a simple way.
  • nzsql script
  • nzsql and single SQL statement
  • bash script
  • verification feature to determine whether the test passed or failed
I found that an extension of BoaTester framework provides the solution to the aforementioned problem. The whole add-on logic is contained in a single Python module. The source code is available here. Once installed and configured, it makes defining and adding new test scenarios very easy.
Technical description and usage example is available here.