-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Integration tests #2682
Comments
I'm more than happy to chip in with a few basic Where these test should sit in the repo structure? I would just launch a container with a given version of ganache for now - later travis matrix or whatever magic can be added to test against beta etc. versions. Some mock contracts might be required to test methods , events etc. To keep things simple I would just add those contracts via some pre-test scripts. Later we can consider creating a web3js test container derived from the standard ganache image, already preloaded with those. I would launch ganache with a deterministic mnemonic so that it's easier to test signing functions. @micahriggan : AFAIK you started to work on this. where are you with it? |
@szerintedmi Sounds great! But I would probably use Geth for now because it's the most used node from the EF and is more up to date with the JSON-RPC spec. |
I didn't suggest not to test against Geth. I meant I'm happy to contribute with |
Yes, @nivida is correct. Ganache doesn't support many RPC methods which are supported by Geth and Parity. So, for now, we should consider Geth. I know ganache is used by most of the developers as a TestRPC. I also use ganache, but it's not up to date. |
Again, the same test should run against Geth/Parity/Ganache. So it's only a question which docker image you are running your tests against. Geth is not so important for us atm but it's literally should be one command to launch a parity or geth container. The heavy lifting here is to create proper tests. Anyway, if ganache is not supporting something then integration tests are a great to expose it. Also running it against future ganache releases will show if they implemented it as you expected. We use ganache for our on-chain tests. It used to have a lot issues but they iterated a lot and it became very stable and fast. (Btw I think trufflesuite/ganache#408 |
What about modifying this to test against any and all supplied RPC endpoints? Then we only need the one container + one parameter, maybe two parameters if there is login info required. It's going to be easier to maintain and those who want ganache or other older tech can see where those projects are falling behind, plus they can test vs services such as AWS blockchain in box and even Infura. e.g.
|
@sshelton76 : I think it's a great idea. Wondering if one or two param will be enough as each provider might require some options to run . but I guess we will see. Would be great to test against Infura too. Do you have a thought how could we test transactions there? Do they have any mock or we would need to deploy mock contracts to a test network? That sounds a bit complicated for me... I would propose one step a time and iterate. For me ganache tests are the easiest to start with as I have the most experience with that. Maybe I draft a very rudimentary first pass PR then we can discuss that? (although first I have to make it work locally,
|
Too general, not actionable. |
Indeed, it's an epic. I'm drafting a rudimentary PR as a conversation starter about approach. UPDATE: great syncing of effort - just seen @micahriggan 's #2688 :)) |
@nivida : I think you are pulling the trigger too soon by closing #2688 . It has been opened 7 hours ago. You are not leaving time for community review. I'm still reviewing both PR-s and I wan't to try both locally too. And it's not about me, there are much more experienced people around who can't jump on immediately. |
@szerintedmi Yeah, that's true but you were commenting there I should decide which PR should be the base. The decision was that I will take the PR from @levino. I think a simple base can be merged quickly and all further e2e tests have to be reviewed closer and from more than just one developer. |
@levino & @micahriggan :
Both approaches has pros/cons which we can discuss just want to be sure I understand it correctly. UPDATED based on @levino 's clarifications |
You are wrong about #2693. https://github.com/ethereum/web3.js/pull/2693/files#r275717827 I find it a bad idea to discuss implementation details in issues. Please let us continue this conversation in the PR. |
Thanks for explaining. Clarified. Is it correct now? Anyway my 2 cents :
These can be addressed in either PR it's just the question which one is easier to start from. I agree that implementation details shouldn't be here but some of it is generic approach question. Discussing these under your PR would result this thread buried if that's not merged. I'm OK to continue there if the decision was made to carry on with that PR. Note: i'm not familiar with this codebase so it's just based on my initial glimpse into it. |
Should we create an issue for |
These are in. |
Description
The Web3.js library QA should get improved with integration tests. The goal is to test it against several node types (Geth, Parity, and Ganache).
These integration tests should run in a docker image for later adding it to the GitHub actions.
Expected behavior
I can execute
npm run e2e
and it will test the whole library with several node types.Actual behavior
There are no integration tests.
The text was updated successfully, but these errors were encountered: