Skip to content
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

System Test: add support for Web JS on soroban dapp test cases #5

Open
sreuland opened this issue Dec 5, 2022 · 4 comments
Open

System Test: add support for Web JS on soroban dapp test cases #5

sreuland opened this issue Dec 5, 2022 · 4 comments

Comments

@sreuland
Copy link
Contributor

sreuland commented Dec 5, 2022

What problem does your feature solve?

e2e tests currently invoke the soroban js/ts code from node/typescript engine referred to in the tests as NODEJS, but don't invoke it from an actual Web browser engine yet, which would validate additional browser side and polyfill aspects of the packaged dist of js/ts.

What would you like to see?

The dapp feature test suite should provide config ability for including Web browser side invocation as a client test case.

Web browser tests use the soroban-js-client

Add 'JSWEB' as Client Tool options in the Gherkin feature definitions(dapp_develop.feature):

  Examples: 
        | Tool         | ContractExampleSubPath | ContractName                  | ContractCompiledFileName             |FunctionName  | Param1    | Result             |
        | JSWEB        | hello_world            | soroban-hello-world-contract  | soroban_hello_world_contract.wasm    | hello        | Aloha     | ["Hello","Aloha"]  |
        | CLI          | hello_world            | soroban-hello-world-contract  | soroban_hello_world_contract.wasm    | hello        | Aloha     | ["Hello","Aloha"]  |
        | JSWEB        | increment              | soroban-increment-contract    | soroban_increment_contract.wasm      | increment    |           | 1                  | 
        | CLI          | increment              | soroban-increment-contract    | soroban_increment_contract.wasm      | increment    |           | 1                  |

Figure out how the web browser test will run, which headless browser?
How should the browser load/run the test js code to invoke soroban-js-client, as a small react app and package.json dependency to js-soroban-client?

What alternatives are there?

@sreuland sreuland moved this to Backlog in Platform Scrum Dec 5, 2022
@sreuland sreuland moved this from Backlog to Next Sprint Proposal in Platform Scrum Dec 5, 2022
@paulbellamy
Copy link
Contributor

I'd suggest https://phantomjs.org/. It's been more reliable than selenium for me in the past.

@jcx120 jcx120 moved this from Next Sprint Proposal to Current Sprint in Platform Scrum Dec 7, 2022
@sreuland sreuland self-assigned this Jan 12, 2023
@sreuland
Copy link
Contributor Author

sreuland commented Jan 12, 2023

i'm tentatively grabbing this, but anyone else that's interested, feel free to take it.

@sreuland sreuland removed their assignment Jan 31, 2023
@mollykarcher mollykarcher moved this from Current Sprint to Next Sprint Proposal in Platform Scrum Feb 22, 2023
@mollykarcher mollykarcher moved this from Next Sprint Proposal to Backlog in Platform Scrum Mar 20, 2023
@sreuland
Copy link
Contributor Author

@Shaptic , is this notion of executing js-soroban-client from a headless browser worthwhile coverage? does it run aspects of js-soroban-client dist that node/tsx invocations will miss iike polyfill aspects? just trying to determine if the extra effort to get this is worth the coverage.

@sreuland sreuland added this to the Soroban Pubnet Release milestone Sep 27, 2023
@sreuland sreuland changed the title Add support for Web JS to client matrix for soroban dapp test cases System Test: add support for Web JS on soroban dapp test cases Sep 27, 2023
@Shaptic
Copy link
Contributor

Shaptic commented Oct 2, 2023

In my experience, the browser-based tests in the libraries themselves are occasionally useful when there are polyfill or bundling differences, yes. They use karma to run in headless browser instances, too.

I think the projected 5 points of work may be worthwhile here because it would avoid having downstream systems (e.g. Freighter, Laboratory) be our guinea pigs for browser builds (as it is today): we could catch issues earlier and not rely on fitting our library updates into their work streams.

@mollykarcher mollykarcher moved this from Backlog to Next Sprint Proposal in Platform Scrum Oct 10, 2023
@mollykarcher mollykarcher moved this from Next Sprint Proposal to Current Sprint in Platform Scrum Oct 26, 2023
@mollykarcher mollykarcher moved this from Current Sprint to Next Sprint Proposal in Platform Scrum Jan 2, 2024
@mollykarcher mollykarcher moved this from Next Sprint Proposal to Backlog in Platform Scrum Jan 30, 2024
@mollykarcher mollykarcher moved this from Backlog to Next Sprint Proposal in Platform Scrum Feb 1, 2024
@mollykarcher mollykarcher removed this from the Soroban Pubnet Release milestone Feb 13, 2024
@mollykarcher mollykarcher moved this from Next Sprint Proposal to Backlog in Platform Scrum Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

4 participants