Open gnidan opened 6 years ago
Hi,
I think I can do this, but I don't know exactly where to start. Can you please give me a hint?
I ran the npm run test
and I was looking into files.
Same here, I was looking for an entry point @gnidan, thanks
@obernardovieira @Meabo thanks for the interest in this!
The basic task here is to write a scenario test in packages/truffle/test/scenarios
, to invoke truffle develop
and run commands inside it.
For a more sophisticated approach, there might be something to the idea of modifying packages/truffle/test/scenarios/commandrunner.js
script to run all scenario tests in various ways:
truffle <command>
on the shelltruffle console
connecting to external Ganache, external Geth, etc.?truffle develop
.
But this would likely require consideration along the lines described in #1336, so there could be parallel CI jobs, for instance. Probably don't want to pursue this approach now, unless anyone has ideas for how this might get engineered.Most immediately, the requirements are that there should be automated tests for truffle develop
, testing a few basic happy/sad paths around at least these commands:
I opened this issue just to address the problem of catching obvious breakages at merge-time instead of release-time.
Thanks @gnidan for quick response.
I have one doubt, CommandRunner.run
is running commands but actually waiting them to end at some point. Since I want to run the truffle develop
and then the other commands inside, is there any example I can follow or do I need to build this kind of thing from scratch?
From scratch, I'm afraid. :/
Oh, a naïve solution might be to wait for the specific stdout output truffle(develop)>
to know when the prompt is available.
A less naïve solution would be to use IPC messaging, since truffle develop
works as part of an IPC cluster. But this sounds like a lot to implement.
Ok, doesn't seem easy at first sight, but I will have a try and reply asap. Thanks so far.
Thank you!
Thank you for raising this issue! It has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you would like to keep this issue open, please respond with information about the current state of this problem.
Not stale
Unfortunately, I did not have time to do much. Shame that it was 2 months ago :disappointed: sorry guys.
Thanks for your response! This issue is no longer considered stale and someone from the Truffle team will try to respond as soon as they can.
@obernardovieira No problem, it will get done eventually :) It does not seem trivial.
Thank you for raising this issue! It has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you would like to keep this issue open, please respond with information about the current state of this problem.
There has been no new activity on this issue since it was marked as stale 7 days ago, so it is being automatically closed. If you'd like help with this or a different problem, please open a new issue. Thanks!
Thanks for your response! This issue is no longer considered stale and someone from the Truffle team will try to respond as soon as they can.
Assigning to myself to keep open 😠
Issue
Ahhh!
truffle develop
was broken onnext
! This shouldn't happen!Requirements
The scenario tests should at least exercise
truffle develop
a little bit. Just so it doesn't get totally broken.There's potentially more work in engineering a testing strategy for interacting with our various REPLs, but this should probably be excluded from the scope of this work.
The scope of work for this issue is basically to ensure that this doesn't happen: