Skip to content

Conversation

@bunsenstraat
Copy link
Collaborator

@bunsenstraat bunsenstraat commented Sep 3, 2022

  • add split paralel by previous runtimes. it's based on names in the results json.
  • replace pauses as much as possible by assertions ( still a lot to do there ). we should also avoid using assert.containsText for elements in react. but use xpath selectors with contains attribute and then wait on it. this needs more work.
  • fix some flaky tests. among others force recompiling when imports are slow.
  • use only compilers on localhost by downloading them in the production assets at e2e build. a script manages this and greps the test files for soljson nightly references. all major versions are automatically included. but only for e2e.
  • an env variable is passed to the build process to tell the app to use another url for loading compilers.
  • use matrix configuration in circle. see below.
  • automatic splitting of tests into jobs that have a separate generic job - containing paralel tests - so we can restart easier without having to run ALL the tests again. FASTER! SUCCESS!! if a job only contains a couple of tests it will pass easier.
  • runtime is about 7 minutes now
  • in config.yml you can find:
            parameters:
              browser: ["chrome", "firefox"]
              script: ["browser_test.sh"]
              job: ["0","1","2","3","4","5","6","7","8","9"]
              jobsize: ["10"]
  • pipe all tests into a single result: tests-passed. this means matrix can be upscaled or downscaled at will. when you need to isolate some tests. We will have to config github to just list that test as required.
    Screenshot 2022-09-20 at 21 33 59
    Screenshot 2022-09-20 at 21 50 56

  • each job still has paralel runs but theoretically of course you could have 20 jobs with little or no parallelism.
    Screenshot 2022-09-20 at 21 48 44

  • the app created hidden spans containing information about the loading status of the compiler, the editor, the types files etc this is used by e2e to check if the load has completed

  • shorten config file with paramater usage

@bunsenstraat bunsenstraat self-assigned this Sep 3, 2022
@vercel
Copy link

vercel bot commented Sep 3, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
remix-project ✅ Ready (Inspect) Visit Preview Sep 21, 2022 at 10:42AM (UTC)

timeout: 2000
}, (okVisible) => {
// @ts-ignore
if (okVisible.status === 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a comment explaining okVisible.status

.sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER)
.pause(2000)
.waitForElementVisible(`li[data-id="treeViewLitreeViewItem${name}"]`, 60000)
.isVisible({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here to use .isVisible instead of waitForElementVisible

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what the problem is that waitForElementVisible first determines the ID of the element and then polls it with isDplayed https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/WebElement.html#isDisplayed--
with an interval, and it seems that if React refreshes the page the nightwatch polling command actually retries to calls the protocol action with the wrong ID resulting in an error. isVisible directly uses the isDisplayed command without polling, it's just a direct webdriver command

TESTFILES=$(node apps/remix-ide/ci/splice_tests.js $2 $3 | circleci tests split --split-by=timings)
for TESTFILE in $TESTFILES; do
npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js $TESTFILE --env=$1 || TEST_EXITCODE=1
npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/${TESTFILE}.js --env=$1 || TEST_EXITCODE=1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please review if this change is required

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it's required

const fs = require('fs');

let url = 'https://binaries.soliditylang.org/wasm/list.json'
let request = require('request');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

request has been deprecated

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now using axios

</div>
</div>
<div className="px-4">
{compilerLoadedVersion ? <span data-id='compilerLoadedVersion' data-version={compilerLoadedVersion}></span> : ''}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check if it is required

package.json Outdated
"nightwatch_local_chrome": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome",
"nightwatch_local_ballot": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/ballot.test.js --env=chrome",
"nightwatch_local_ballot_0_4_11": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/ballot_0_4_11.test.js --env=chrome",
"nightwatch_local_ballot_0_4_11": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/ballot_0_4_14.test.js --env=chrome",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update the name too with 0_4_14

filip mertens added 2 commits September 21, 2022 12:18
@bunsenstraat bunsenstraat merged commit 34579ff into master Sep 21, 2022
@bunsenstraat bunsenstraat deleted the optimizecircle branch September 21, 2022 12:44
@bunsenstraat bunsenstraat added the browser-tests e2e tests for remix-ide label Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

browser-tests e2e tests for remix-ide

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants