Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Automatic test generator, at least automatic creation of mock data #97

Open
manudss opened this issue Aug 6, 2019 · 1 comment
Open

Comments

@manudss
Copy link

manudss commented Aug 6, 2019

For a long time, I dream of a tool that would automate or at least simplify the creation of tests.
Indeed, when working with javascript, we often work with large json structures. And so to write the unit tests, we have to write mocks with all this data. And this is therefore very time-consuming, more than describing the test itself.

I would dream to have a tool, which when running an application, that it is able to record all the input output of a function, and then why not generate the tests of this function.

I have the impression that what the approach made by typewiz, could allow to realize that? At least record the inputs and outputs of each function.
What do you think ? Would that be possible?

Ps: for now I have not yet managed to run typewiz.

@urish
Copy link
Collaborator

urish commented Aug 25, 2019

Hi @manudss, thanks for the feedback!

What you describe sounds feasible to some extent. At least in some cases, the inputs and outputs of functions can be captured automatically in run-time. Some matters that can complicate this are nested structures, callbacks and objects that have non-trivial behavior (such as DOM elements, sockets, etc.).

In fact, @shairez and I have been exploring something similar last year. You may want to speak to him as he's been doing a lot of work related to automated mocking for testing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants