Playwright File Structure Convention

Home Forums Software Testing Discussions Playwright File Structure Convention

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #29819
    Maruschka
    Participant
    @mishaimie

    New to QA and Playwright.

     

    Related to styling and file naming conventions:

     

    Say you have complex software with multiple endpoints that you are writing automated tests for. How would you organize your tests? My approach is to relate it to the use case of the test. i.e.

     

    -resources

    –GET

    —filterResources.test.ts

    —getSingleResource.test.ts

    –POST

     

    Whereas an approach was suggested to divide it down even further related to the readability of the actual test file. i.e

     

    -resources

    –GET

    —filterResources.test.ts

    —filterResourcesLoops.test.ts

    —filterResourcesParametarized.test.ts

    —getSingleResource.test.ts

    —getSingleResourceLoops.test.ts

    –POST

     

    UPDATE: Upon some further digging it also seems that some prefer to take it further and have a test file for every test case. i.e.

     

    -resources

    –GET

    —filterResourceBySearch.test.ts

    —filterResourceByVersion.test.ts

    —filterResourceByDate.test.ts

    —getSingleResourceKey.test.ts

    –POST

     

    I cannot find any decent reading material covering the topic. What is the standard convention in this regard? Do you have any suggested reading material on the topic?

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.