Improving end-to-end tests

In Chapter 6Testing and Continuous Integration, we saw that some of the e2e tests were commented out because of the difficulty in generating tests for an entity with a required relationship. Try to fix the tests with the following approach:

  1. Add a method to delete entities after creation, similar to what we saw in Chapter 6Testing and Continuous Integration, for the customer entity spec.
  1. Uncomment the commented-out e2e tests in the files under src/test/javascript/e2e/entities.
  2. Navigate the protractor to the related entity page and create a new item. If the related entity has required relationships, then follow the same approach and nest them until all the required entities are in place. This can be done in a beforeAll method of the test as well.
  3. Now go back to the entity under test and see whether the test works fine.
  4. Once the test is complete, delete the created entities in the afterAll method of the test.
  5. Explore whether you can automate the creation of an entity item on the page object of the entity and use it when needed.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.25.74