Closed krishna01012019 closed 6 years ago
Automation code is most definitely development code. But the directory it lives in it is a convenience for the build process, not a reflection on the care you should put into writing it. The conventions I would recommend are the following:
Hi wakaleo ,Thanks for reply . For Automation developer , we use serenity-cucumber.jar as application code that can be included it in Maven as dependency. Automation developer never write any code related to application ,we always use developers code as jars that will be included in libraries. Hi I have created folder structure as below,tests works like a charm.I have not seen any issues. src/main/java ->common utilities ->featurefiles ->pageobjects ->stepdefinitions ->TestRunner -->resources--> serenity.properties serenity.conf
I believe application code with developers ,in case of developer ,test folder will be used for unit tests and main folder will be used for application related.
If we see any other frame works such as TestNG , POM and Data driven ,all use src/main not test folder. I believe, Automation developer uses 'test' folder ,in case wants to give few examples when writing API tests. Please advise.
It's up to you. If your project is a dedicated automation test suite, then domain models, page objects, steps, tasks, interactions etc should go in main, and the test runners (and unit tests for non-trivial test domain code) should go in test. If you are including the acceptance tests as part of the main project (many teams do this as well), the everything should go in src/test.
This is more a question for the chat channels (https://serenity-bdd.rocket.chat), so I will close this here - please feel free to continue the conversation there.
HI giving my opinion below ,Please advise When we create Maven project we get folder structure as src, main and test. Suppose In development, Main folder can be used for actual code development and test folder will be used for unit tests(or examples of usage). Even Automation development also is a development , So we follow and write code into main folder but not into test folder . main folder should not be empty .I feel that is not a good design.
I believe,whatever examples are given for using of serenity those examples directly copied from unit tests(test) folder.So Automation developers leaving main folder as empty and actual code starting from test folder. Can't we create feature file under src/main/resources? |----src | |----test | | |----resources | | | |----features | | | | |----search | | | | | |----search_by_keyword.feature | | | | |----shopping_cart | | | | | |----adding_items_to_the_shopping_cart.feature
As per automation frame work design , Is it the correct way of doing. Please advise.
With Best Regards, Krishna