demo.shop.shop.ben.xml Maven / Gradle / Ivy
Go to download
benerator is a framework for creating realistic and valid high-volume test data, used for
testing (unit/integration/load) and showcase setup.
Metadata constraints are imported from systems and/or configuration files. Data can imported from
and exported to files and systems, anonymized or generated from scratch. Domain packages provide
reusable generators for creating domain-specific data as names and addresses internationalizable
in language and region. It is strongly customizable with plugins and configuration options.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! Demonstration file for populating the shop database. !
! !
! You can choose a database and a stage like this: !
! -Dstage=development -Ddatabase=oracle !
! !
! These database types are provided: !
! oracle, db2, sql_server, mysql, postgres, hsql, !
! hsqlmem, mysql, firebird, derby, h2 !
! !
! ...and these stage configurations: !
! development, perftest !
! !
! Set up your database connection in the file !
! <database>/shop.<database>.properties !
! !
! You may want to try different generation quantities in !
! shop.<stage>.properties !
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
no stage specified, using 'development'
stage = 'development'
no database specified, using 'hsqlmem'
database = 'hsqlmem'
setting default values
import stage and database specific properties
log the settings to the console
define a database that will be referred by the id 'db' later
drop the current tables/sequences if they exist and recreate them
Creating a valid base data set for regression testing by importing a DbUnit file
Importing some more predefined products from a CSV file
You could import them from a flat file as well, e.g.
iterate name="db_product" source="products.import.flat"
pattern="ean_code[13],name[30],category_id[9],price[8r0],manufacturer[30]" consumer="db" /
Creating products of random attributes & category and exporting them to
the database as well as to a flat file
create one default order for each customer based on a DBUnit template
create customers
create orders for random customers and random products
create order items
fix order data
© 2015 - 2025 Weber Informatics LLC | Privacy Policy