question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support something like chancejs for dynamic data generation

See original GitHub issue

In our unit and integration tests, we use http://chancejs.com a lot, for reasons of variation testing, data realism, and general amusement.

I’d like to see the same sort of support in Artillery so that we can do something like

"scenarios": [
    {
      "flow": [
        {
          "loop": [
            {"post": {
               "url": "/create-user",
               "json": {
                  "email": "{{ chance.email() }}",
                  "password": "{{ chance.string(length: 10) }}"
               }
            }}
          ],
          "count": 100
        }
      ]
    }
  ]

The format of the chance inserts is undetermined, can’t immediately think of a nice way to do it.

Right now I’m using mockaroo (some website I found which generates CSVs with chance-like data) to generate CSVs, but it’s a pay-for product and it’s still very static.

Thoughts?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lightglitchcommented, Jan 5, 2017

The ability to integrate third-party generators like the one mentioned above or faker.js to create dynamic variable values would be a must. When we want to test thousands of users registrations is a pain to create the CSV.

0reactions
hassycommented, Nov 10, 2021

for anyone who might come across this -> https://github.com/beyonk-adventures/artillery-plugin-chance

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cypress - Use Chance JS to generate Data and store that ...
One way would be to generate the item the first time and save it in Cypress.env() variable and then use it through out...
Read more >
Reproducible random tests with Jest and ChanceJS
Here we generate test data that has a random input and the corresponding expected output. This way, every single test execution works with ......
Read more >
Dynamic Data Generation with JavaScript | by Adron Hall
This file simple data generation is something I put together to create a csv for some quick data imports into a database (Postgres,...
Read more >
20 Resources for generating fake and mock data
A simplified way to generate massive mock data based on a schema, using the awesome fake/random data generators like (FakerJs, ChanceJs, ...
Read more >
Data mocking – Ways to fake a backend (API) - Michael Kühnel
Data, Mocking, Rest, JSON, API, Frontend, Backend, Fake, Testing ... Plus it offers more possibilities to configure things like HTTP status ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found