Hi all,

I feel that the test code in BVT and Regression tests (smoke and component 
folders) should be more consistent. There are feature developers adding tests 
into smoke and different test developers adding more tests into component 
folder, it is evident that inconsistencies are bound to arise. But with time, 
we should be striving to minimize them.

I have listed few of the inconsistencies below. Feel free to add to the list if 
you think of more.

1. List Methods: 

If we want to list accounts, some tests use Account.list method, while some use 
list_accounts method. Both methods finally do the same thing, but there are 
many list methods in common.py file corresponding base class methods in 
base.py. This is code duplication.

I feel that BaseClass.method() is more readable than list_xyz(), or should be 
preferred.


2. Checking empty/None lists:

We already have validateList utility method which checks both empty lists and 
None objects. No need to use “isinstance” method, or add additional None checks.


3. Pep8 issues:
Many files are not pep8 consistent. In the past I have tried to fix pep8 issues 
in files and the mission is ON. Efforts need to be put into this. We already 
have autopep8 tool which does most of the things.


I will be creating separate issues in JIRA for listed things. Everyone is 
welcome to add pull requests for these tasks.
I personally will be putting more efforts into these in upcoming few months. 
2-3 months and we should see most of the tests consistent with each other.

Regards,
Gaurav

Reply via email to