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
test: migrate test.js to support concurrent test execution #1531
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aslushnikov
force-pushed
the
parallel-test
branch
3 times, most recently
from
December 7, 2017 23:36
7349b16
to
cc4518e
Compare
test/test.js
Outdated
expect(FrameUtils.dumpFrames(restoredPage.mainFrame())).toBeGolden('reconnect-nested-frames.txt'); | ||
expect(await restoredPage.evaluate(() => 7 * 8)).toBe(56); | ||
await browser.close(); | ||
})); | ||
}); | ||
describe('Puppeteer.executablePath', function() { | ||
it('should work', SX(async function() { | ||
it('should work', SX(async({urls}) => { |
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.
Let's remove SX in this patch.
aslushnikov
force-pushed
the
parallel-test
branch
from
December 8, 2017 01:10
cc4518e
to
ef2612e
Compare
Run tests in parallel. The amount of threads equals to the CPU count.
aslushnikov
force-pushed
the
parallel-test
branch
from
December 12, 2017 05:41
ef2612e
to
a3b5ce5
Compare
test/test.js
Outdated
if (fs.existsSync(OUTPUT_DIR)) | ||
rm(OUTPUT_DIR); | ||
})); | ||
const port = 8907 + state.parallel * 2; |
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.
index
JoelEinbinder
approved these changes
Dec 12, 2017
aslushnikov
changed the title
[Experimental] run parallel test on travis
test: migrate test.js to support concurrent test execution
Dec 12, 2017
dios-david
added a commit
to dios-david/puppeteer
that referenced
this pull request
Dec 16, 2017
This patch fixes broken Tracing tests which are failing since the `state.parallel` -> `state.parallelIndex` modification of puppeteer#1531
This was referenced Dec 16, 2017
aslushnikov
pushed a commit
that referenced
this pull request
Dec 18, 2017
This patch fixes broken Tracing tests which are failing since the `state.parallel` -> `state.parallelIndex` modification of #1531
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch migrates tests so that they can be run concurrently.
node test/test.js -j 4
ornpm run unit -- -j 4
PPTR_PARALLEL_TESTS
could be set to override default parallelizationEvery test gets passed in a
state
. State is set up in thebeforeAll
andbeforeEach
callbacks,and should be teared down in the
afterAll
andafterEach
callbacks.By default, state has a
parallelIndex
variable initialized that defines the thread index that runs the execution.