Hi Folks,
Follow below code review checklist
Sr. No Checklist Item Category
1 Use Meaningful Names and camelcaseletters for variables and method names Readability
2 Add Proper Comments for your Code Readabilty/Maintanance
3 Avoid Duplication of variables and methods Reusability
4 Donot write in single line Readability
5 Avoid creating unnecessary objects Performance
6 Remove Unwanted Imports Standards
7 Make sure the code formatting is applied Standards
8 Make sure the code meets the functional requirements Functionality
9 Check side effects on existing codes if any modification in script Functionality
10 Make sure to do clean up for unwanted code Standards
11 Limit the accessibility of packages,classesand methods only to necessary places Accessiblity
12 Donot expose confidential Data in logs Security
13 Make sure the exceptions are handled Exceptions
14 Avoid excessive logs Standards
15 Avoid Multiple If cases Performance
16 Try using dynamnic waits (Avoid Thread sleeps) Performance
17 Avoid Hardcoded values in code Security
18 Free up space/Memory after use Performance
19 Minimize the scope of local variables Accessiblity
20 Exceptions should be Throwable Exceptions
21 In every catch statement – call the UI reusable library function and catch block should not be empty Reusability
22 Try to avoid use of mobile center in condition Standards
23 use appropriate hard assert for the mandatory validation Standards
24 Assertion should be use outside the try catch block and in case needed to use in try block than Catch(AssertionError e) should handle correctly Standards
25 Xpath: There should not be any platform specific xpath hardcode in the code/pageclass Standards
26 Xpath should not be directly written in methods .Write only in Page factory Readabilty/Maintanance
27 Xpath- use only absolute xpaths Standards
28 xpath- do not use ID in xpaths Standards
29 xpath- use dynemic index instead of hardcoding in xpath Standards
30 There should be no test data pass through any of the property files Security
31 Any test data input should be from Excel Security
32 Nowhere Environment details should be hardcoded for any kind of validation Security
33 Always use the 3/2 argument Assert statement for code readability point of view (expected/actual/description of validation) Readability
34 Device type should handle via object repository only. Device type should not written in class files Maintanence
35 All public method should be on top of the class and all private method should be below it Readability
36 There is no hard of validation message in page classes, it should be in validation message file Reusability
37 All feature file should have tag with particular UB number Standards
38 Reporting- all the necessary validation should be part of reporting along with screenshots Standards
39 Reporting- all the reporting verbage should be proper along with appended test data for validation for actual vs expected Standards
40 Reporting-Use reusable reporting function for screenshot, allure and extent reporting Readability
41 Reporting- Keep only screenshot option to Yes, if needed else switch of the function Performance
42 Reporting- Take screenshot of entire page at least once during the validation journey Readability
No comments:
Post a Comment