Comments (7)
From what it sounds like, you want to generate a number of events and generate them in order. This is definitely doable with this framework. You can also simulate multiple users. If you take a look at the exampleWorkflow.js
in the src/dist/conf
directory, you see that this workflow simulates a person entering a building, logging into a computer, performing some random actions, and then logging out and leaving. The events are generated in the order they are placed in the config's steps
property.
To have multiple users you would create multiple Workflows (if you wanted them to be different) and then list them in the Sim Config workflows. Then both of those workflows will run when the simulation starts.
You mentioned a "cursor" and the is a type of cursor, but only within an event. See the this.propName
and cur.propName
sections of the documentation. These allow you to reference already generated values, but only within the current json event being generated. You can't currently reference values within a previously generated event unfortunately.
Hope this helps! If not, let me know.
from json-data-generator.
Hi Andrew, thanks for the promptly reply. In the exempleWorkflow.js, the user enters the build, logs in, performs a single action and leave.
how would you do have a random number of actions for a given step instead of a single action? is, user enters build (1 step/1 event), logs in (1 step/1 event), performs a random number of actions (1 step/N events)? Is it possible?
Thanks again for the help
from json-data-generator.
Yes, that's possible. Check out the Step's duration
config option in the documentation. It gives you the different ways to set it for what you want.
from json-data-generator.
Hi Andrew,
One last question, is it possible to format dates and numbers? I tried date().toString('yyyy/MM/dd') but it has no effect.
If you allow me a feature suggestion, it would be great to have a put/get function to add into a kind of session object, allowing us to share some values in running workflow. Something like:
steps:[
{config:[{ "birthdate": "put(date(),'birthday')"},{...},{...}]},
{config:[{"userBirthdate":"get('birthday')"}]}]
from json-data-generator.
Unfortunately, there is no way to format a date. Also, as you noticed, there is no type of session/context. Both are good ideas though! Feel free to submit them both as feature requests. If you have time to implement either, we always welcome pull requests!
from json-data-generator.
Closing based on lack of activity. If there is still an issue, please let me know.
from json-data-generator.
The idea of state was referenced here and I'm trying to track those request in #28
from json-data-generator.
Related Issues (20)
- Generate JSON web server logs HOT 2
- Any plans to support SQS producer? HOT 1
- Need help to change the configuration file to limit the numbers of record i create
- Integer values within JSON array are not been maintained
- Can't generate array of double HOT 2
- support for Basic Auth in HttpPostLogger
- Writing multiple iterations to a single file HOT 3
- Error while using the repeat() function in my Workflow defenition HOT 6
- data generator to kafka
- Troubles running default config
- BUG: closing parenthesis ")" breaks parsing arguments HOT 1
- Upgrade jackson-databind to 2.9.10
- Upgrade mqtt library to v1.2.2
- Properties from prev step.
- Not able to generate JSON output from the schema HOT 1
- HTTP-POST error 404 HOT 1
- Main thread never terminates HOT 1
- How to generate multiple pieces of data in one json file instead of one line of data per file HOT 1
- Allow a DataSource to be used to provide values in generated items HOT 1
- Adding custom function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-data-generator.