-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support automated tests for full-node mode and light-client mode #290
Comments
IMO, Neuron's E2E testing can be divided into two categories:
The first category of testing is similar to standard software testing processes and can be supported by automating verification by importing test data into Neuron's database. The specific workflow is as follows:
The second category of testing is different from standard software testing and is more similar to end-to-end testing for backend services. One challenging aspect is the need to cover both full node and light client modes. However, after isolating the full node and light client databases (#294), it is possible to complete this testing by comparing database snapshots. The specific steps are as follows:
Since the data volume for light clients is smaller, testing the synchronization of light clients can also be performed by importing them into the testing environment each time, rather than maintaining a persistent environment. |
In order to ensure the continuity of dynamic operations,we should consider how to make data usable.For example,if we want to test send transaction firstly ,then send lock time transaction,sufficient balance in wallet is needed to advoid throw abnormal tips and automated situation are interrupted. |
Now that E2E tests are grouped into 3 parts, we can make schedules for each one. I'm a bit familiar with test frameworks for UI/interactions, so I will lead this part. There are 2 frameworks for an electron app
They are almost the same for our project except
Personally prefer playwright for our test framework of UI because failure to download cypress in CI did annoy me, any idea from @yanguoyu @homura @WhiteMinds @devchenyan @zhangyouxin @Daryl-L @PainterPuppets |
Playwright will be used if there's no more feedback |
@Keith-CY This issue will be taken by @devchenyan, please hand over the relevant work content. |
I'll DM @devchenyan for this task |
Which github code link is related to this ? |
The PR is nervosnetwork/neuron#3004 but I found the CI failed, please have a check @devchenyan |
Any update on this PR @devchenyan |
Now neuron can launch ,but can not locate element,what is the way to locate electron element ?@devchenyan |
If launch by manual operation,we can write send transaction as first example ,does send page element can be located?can you upload a video for writen process if it is convenient for you ? @devchenyan |
I have found that a Electron helper can not exit automatically when neuron exit. 2024-07-04.10.22.05.movwhen force out this helper ,and open neuron again ,tne sync become normal,maybe my problem is related to https://github.com/orgs/Magickbase/projects/6/views/2?pane=issue&itemId=68796884 |
I will check this, but it's an exception branch, so it may not break the main process. |
So currently sync is normal? |
/neuron/packages/e2e/README.md has updated. |
All test cases have been completed, but they need to be run manually on a regular basis and cannot be fully automated, pending subsequent optimization. |
I ran with the branch |
I do nothing,just run CI...OK, if it is right now ,I will go on. |
When you input the amount, the transactions have not synced yet. After the transactions are synced, the amount doesn't change, so the page will not refresh in the screenshot. After I change the amount, it will show correct. 2024-08-13.15.05.55.movBesides, after this commit,
Running locally e2e test case will be similar to the action running. |
Recently we found some unexpected behaviors of Neuron when it was in the light client mode. Then I realized that Neuron is a very special case in CKB ecosystem because it's the only product that supports full-node and light-client simultaneously. That means, tests should be doubled for the same function.
Due to the increment in workload, we should accelerate the automation of tests.
It would be challenging because we haven't figured out how to run the e2e tests with full-node in the github runner but now there comes another ckb client.
I'll connect to acceptance team to see if they have handled such situations.
Ref:
The text was updated successfully, but these errors were encountered: