demo.script.ben.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of databene-benerator Show documentation
Show all versions of databene-benerator Show documentation
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.
The newest version!
{ls ${lsparams}}
print('Hello ' + context.get('user.name') + '!');
DROP TABLE db_user;
CREATE TABLE db_user (
id int generated by default as identity (start with 1) NOT NULL,
name varchar(30) NOT NULL,
PRIMARY KEY (id)
);
importPackage(org.databene.model.data);
print('DB-URL' + db.getUrl());
// create user Alice
var alice = new Entity('db_user');
alice.set('id', 1);
alice.set('name', 'Alice');
db.store(alice);
// create user Bob
var bob = new Entity('db_user', 'id', '2', 'name', 'Bob');
db.store(bob);
// persist everything
db.flush();
© 2015 - 2025 Weber Informatics LLC | Privacy Policy