Skip to content

test(forms): refactor integration tests to improve speed - #13500

Merged
chuckjaz merged 1 commit into
angular:masterfrom
marclaval:formsTestRefactor
Dec 16, 2016
Merged

chuckjaz merged 1 commit into
angular:masterfrom
marclaval:formsTestRefactor

Conversation

@marclaval

Copy link
Copy Markdown
Contributor

While investigating browser disconnections in SauceLabs, I found out that the forms integration test were quite slow and CPU intensive.
Using TestBed.configureTestingModule() for all components in beforeEach() is clearly not ideal.

These 130 tests were taking 13s to run on my machine.
With these changes,the only take 4s!!!
As a result, the full campaign goes from 43s to 34s.

Hopefully, this will also help with the disconnections.
But it might not be enough ...

@marclaval marclaval added the action: review The PR is still awaiting reviews from at least one requested reviewer label Dec 15, 2016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(component: Type, ...directives: Type[])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

function initTest<T>(component: Type<T>, ...directives: Type[]): ComponentFixture<T> could be even better.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@vicb vicb added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews pr_state: LGTM and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 15, 2016
@marclaval
marclaval force-pushed the formsTestRefactor branch 2 times, most recently from 17f4bda to 54e4c49 Compare December 15, 2016 21:50
@marclaval marclaval added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Dec 15, 2016
@chuckjaz
chuckjaz merged commit 55dfa1b into angular:master Dec 16, 2016
@DzmitryShylovich

Copy link
Copy Markdown
Contributor

@marclaval
marclaval deleted the formsTestRefactor branch December 11, 2017 10:02
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants