Defining Test Data For The Transportation Scheduling Example - Gnorion/BizVR GitHub Wiki

Defining Test Data For The Transportation Scheduling Example

I envisage a person in the role of "Tester" who might set up an entire workspace with "Decisions" that generate test data. And again if we use our existing table structure to represent the data which can be exportec then we can probably add rules to VV to check the test data. In fact if VV also had an example of the decision that the data was intended for it could probably cross check the values against what is tested in the actual rules. But we'll get to all of this in time.

To generate this set of drivers:

image

The table would look like this:

image

Orders is a bit more complex since each order contains an embedded customer object so we'll need two tables, one for each:

Orders can be defined like this:

image

And then the customers can be attached to the orders like this:

image

We could also have done it the other way around if the orders were embedded within the customer object

Notes:

Since the order contains an embedded customer we need two tables (one for each): We define the customers here with info on which order they go with And then define the orders Probably should do the orders first and then go through the orders attaching the correct customer Again, pretty straightforward. And you can easily switch customers for an order by changing line 2 of the first table. Of course you'll need to create some code to process these tables in order to actually generate json. But at the moment I don't see any complications. It might even be possible to do all this in a single table - but separating them seems easier to follow. [And taking this one step further - I imagine it might be possible to autogenerate some or all of this from data stored in a database. You could select some rows from the db to populate these tables and then you could add the extra logic to connect things up. And I suppose if you started by entering data into our tables, at a later date you could ask BizVR to create a database and store the data Or update an existing one We'd just need to attach an appropriate SQL statement to the data table (along with connection information).

And it doesn't even need to be a database - it could be an API call to some cloud service that manages data in some peculiar way (Hadoop for example)