A: Dbmonster introduction
This is often not easy for test engineers when it comes to some applications that focus on data calculations, such as reporting programs, or when load and stress testing an application often requires a lot of load in the database. Of course, getting the existing data from the "Live Database" is a way to test the underlying data, but what if there is no field data available, or if the field data is difficult to obtain.
The answer is only one-using tools:). This business tool has Quest Company's DataFactory tool that can produce almost any data you need. However, as an advocate of open source tools, I would like to introduce today is an open-source test tool Dbmonster for this purpose.
Dbmonster is a Java open source project that connects to a database in jdbc mode, so it can be run on any Java and JDBC-enabled platform . The original intention of dbmonster development is to serve the database developers, which can assist in generating a large number of rules or irregular data, making it easier for database developers to tune databases based on these data.
Dbmonster controls the behavior of data through two XML files (configuration files and schema files), which indicate the database that needs to be connected, the user name and password used by the connection, the sheme to be manipulated, the number of retries, and so on. The scheme file indicates the rules that produce data for each field in each data table.
II: Dbmonster Download, install
First, install the JDK and configure your environment variables. There are many such articles. If you are installing under Linux, you can view this article http://blog.csdn.net/backtracker/article/details/6624715
download of Dbmonster
Dbmonster can be downloaded to sourceforge, download the address for http://sourceforge.net/projects/dbmonster/files/, please download Dbmonster-core file. If the integration of Dbmonster and Ant is required, then http://download dbmonster-ant is required.
operation of the Dbmonster
Dbmonser operation is also very simple, dbmonster extracted bin directory has dbmonster.bat and dbmonster files, if it is on the Windows platform, You can run the Dbmonster.bat file directly, or run the Dbmonster file if it is on a UNIX platform. Before running, you need to configure the path where the Dbmonster-core-1.0.3.jar is located in the CLASSPATH environment variable.
The main parameters of the Dbmonster runtime are the-C and-S, respectively, indicating the location of the configuration file and the schema file. The default configuration file is located in the installation directory of Dbmonster, and the name is Dbmonster.properties (this file needs to be created manually), and you need to copy dbmonster-schema.xml files from the examples directory to the Dbmonster installation directory.
To run the example:
Dbmonster.bat-c dbmonster.proprities-s Dbmonster-schema.xml
Description
I use Dbmonster in XP, so I use Dbmonster.bat. Please switch to the Dbmonster-core-1.0.3\bin directory before using this command.
-c Specifies that the configuration file specifies the schema file as Dbmonster-schema.xml for Dbmonster.properties,-s.
In the next article I'll show you how to modify dbmonster.properties and dbmonster-schema.xml to generate random data
Database test Tools Dbmonster use
Reference article: Dbmonster data generation