Is there a way to speed up AngularJS protractor tests?

后端 未结 7 507
孤城傲影
孤城傲影 2021-01-31 05:10

I have created tests for my application. Everything works but it runs slow and even though only 1/3 of the application is tested it still takes around ten minutes for protrator

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-31 06:00

    From what I know:

    • run test in parallel
    • inject data in case you are only testing a UI element
    • use CSS selectors, no xpath (browsers have a native engine for CSS, and the xpath engine is not performance as CSS engine)
    • run them on high performant machines
    • use as much as possible beforeAll() and beforeEach() methods for instructions that you repeat often in multiple test

提交回复
热议问题