-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collect system-level tests and start removing Ruby tests #4853
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
If I understand well we will need to remember whenever we add/remove any integration test we need to update tests.md
Yes, that's more or less the idea. |
@paweljakubas Given that you seem to be the one most aware about those integration tests, could you have a look at the ruby tests and mark which ones, in your opinion we should preserve? |
@abailly not a question I can give 100% confidence answer. why? Those tests were added long time ago by our QA engineer (that happened to know Ruby) and were supposed to replicate some integration tests and run them against preprod (previously testnet) and check scenarios engaging wallets with HISTORY. Ocassionally, they were able to surface edge case bugs. As we are not adding logic and integration tests so much and Ruby tests were run many times and found what they can detect, AND as we are not so eager to work with this codebase, I would tentatively propose to abandon them. If we are to start adding integration tests + logic we might return to the subject and think how to test against preprod with wallet with history but with codebase we are into. @HeinrichApfelmus @paolino @Anviking make sense? |
to sum up: I would remove them all as we speak as they are burden now and not adding value imho. |
Thanks @paweljakubas, I am happy to remove those, but let's wait for feedback from the rest of the team |
tests.md
Outdated
it 'Delegating address with both pub key credentials' do | ||
it 'Delegating address - payment from script, stake from key' do | ||
it 'Delegating address - payment from key, stake from script' d | ||
it 'Malformed payload when tx is not binary' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that this test exercises the POST /proxy/transactions
endpoint of cardano-wallet
.
tests.md
Outdated
it 'ping-pong' do | ||
it 'game' do | ||
it 'mint-burn' do | ||
it 'withdrawal' do | ||
it 'currency' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are currently no longer tested with integration tests: https://github.com/cardano-foundation/cardano-wallet/blob/master/lib/integration/scenarios/Test/Integration/Scenario/API/Shelley/TransactionsNew.hs#L2987-L3045 (withdrawal
not there, the others exist but are marked pending)
I would like to note that — most unfortunately — I find the Ruby E2E tests easier to read and understand than the Haskell integration tests.
To summarize: Unfortunately, our Haskell integration tests contain technical debt to the point where I think that they do not compete well against the Ruby E2E tests. |
@HeinrichApfelmus From what I have seen, I am tempted to agree and I am against building such a large integration test suite as it's a great source of tech debt, complexity, flaky tests, etc. |
Yes. The question is of course: "Which something?" The way I see is that we have different options with different amounts of effort:
It is not clear to me that 1. is a priori more effort than 2, 3, or 4. In addition, we have to consider the opportunity cost of not investing into option
The modular our codebase is, the cheaper 6. becomes. Option 4. would move us to a more modular codebase, so my gut feeling is that a combination of 4 and 6 plus down-payments on 1 is probably the route that requires less engineering effort than the others. |
My comments (but I really think we need to spend more time discussing f2f in front of whiteboard than through GH clumsy PR):
I don't mind having Ruby code, I just don't want to maintain 2 different things which serve the same purpose and each take time to run, delay feedback, are hard to run locally, and ultimately hamper delivery speed.
Significant effort, and I already said I would rather reduce the amount of integration tests we have as I am 100% confident we are testing things which would be much better tested at a finer grained level.
That has my favour.
I don't understand what this has to do with the discussion. This PR's goal is to spark the discussion and start the ball rolling, but what I am sure is that statu quo is undesirable. It's unclear to me what value do the E2E tests bring us given the apparently huge amount of overlap they have with Haskell integration tests and the latter seem much more actively maintained (and perhaps that's a problem too). Quick stats:
I would like to also understand what's the payoff for all these system-level tests, and I understand this is hard to tell: How many times did the E2E test suite prevented a change from introducing a bug? Same question goes for Haskell integration tests? |
Sure. Perhaps put it on the agenda for our Dev Meeting?
I don't disagree, but I think that the "definitely" needs to be weighted by effort compared to effort of alternatives.
What I'm trying to say is that the effort of maintaining a test suite only pays off it the software under test is still subject to meaningful changes. At this point, it's not clear to me that this is still the case. Hence I'm bringing up the alternative of freezing the old in
In the past, these have been the only tests for features such as delegating voting power to a DRep.
Pawel and Johannes know better, but I am told that historically, Piotr's E2E tests have caught at least three bugs. |
Here is a quick summary of current situation:
What should we do? |
It seems attempting a smooth and incremental migration is not really worth it, so we are left with 2 options:
|
These tests are actually testing other software, namely cardano-address and SMASH which are outside our control. And we know for a fact the former is thoroughly tested.
8cfde86
to
107d7bc
Compare
I just realized that the Ruby E2E tests are our only tests that exercise the Windows platform. If we remove them now, we don't have any integration test on Windows before a release. 🤔 |
That's a fair point @HeinrichApfelmus |
This PR is a first step in an effort to rationalise our testing approach as outlined in #4852.
misc
Ruby tests which are not testing cardano-wallet