Code Review In Testing View
description
Transcript of Code Review In Testing View
![Page 1: Code Review In Testing View](https://reader036.fdocuments.in/reader036/viewer/2022062312/553992b5550346b4378b49fc/html5/thumbnails/1.jpg)
Company
LOGO
Md. Rizwanur Rashid
Enosis Solutions[http://www.rizviews.com]
Code Review in [Testing View]
![Page 2: Code Review In Testing View](https://reader036.fdocuments.in/reader036/viewer/2022062312/553992b5550346b4378b49fc/html5/thumbnails/2.jpg)
A quotation…………….
“Testers can partner with developers to strengthen unit tests, participate in code reviews and inspections, and better understand where to focus their ‘testing attention’ based on a more in-depth analysis of the system.”
-Bj Rollison-Test Architect, Microsoft[Source: Interview of Bj Rollison]
![Page 3: Code Review In Testing View](https://reader036.fdocuments.in/reader036/viewer/2022062312/553992b5550346b4378b49fc/html5/thumbnails/3.jpg)
Code Review
![Page 4: Code Review In Testing View](https://reader036.fdocuments.in/reader036/viewer/2022062312/553992b5550346b4378b49fc/html5/thumbnails/4.jpg)
Code Review in Testing View….
Devs will perform their part of review. We’ll perform some additional, such as:
Identify code blocks which may create crashing bug!
Identify code blocks which may increase execution time (performance issue!).
Identify code blocks which may cause memory leaking.
Database inconsistencies Cosmetic Issues
![Page 5: Code Review In Testing View](https://reader036.fdocuments.in/reader036/viewer/2022062312/553992b5550346b4378b49fc/html5/thumbnails/5.jpg)
Example: Read File
StreamReader re = File.OpenText(“file.txt”);
string input = null;
input = re.ReadLine();
while ((input=re.ReadLine())!=null)
{
}
re.close();
Will always skip first line!!
Functional flaw which identified earlier!
![Page 6: Code Review In Testing View](https://reader036.fdocuments.in/reader036/viewer/2022062312/553992b5550346b4378b49fc/html5/thumbnails/6.jpg)
Example: Database Connection
SQLConnection con = new SQLConnection();<Initilizing object con>con.open();<Blah; blah; whatever!><End of coding!>
try{ SQLConnection con =new SQLConnection(); <Initilizing object con> con.open(); <Blah; blah; whatever!> <End of coding!>}catch{}finally{ con.close();}
![Page 7: Code Review In Testing View](https://reader036.fdocuments.in/reader036/viewer/2022062312/553992b5550346b4378b49fc/html5/thumbnails/7.jpg)
Example: Try-Catch
class foo1(){
foo1(){
foo2();}void foo2(){
try{
………..;}catch (Exception exp){
throw exp;}
}}
class foo1(){
foo1(){
try{foo2();}catch (Exception ex){whatever!}
}void foo2(){
try{
………..;}catch (Exception exp){
throw exp;}
}}
![Page 8: Code Review In Testing View](https://reader036.fdocuments.in/reader036/viewer/2022062312/553992b5550346b4378b49fc/html5/thumbnails/8.jpg)
Example: Null Check
Better to perform Empty/null checking.
void foo(){string var1;------------------------if(!string.IsNUllOrEmpty(var1) do something;
}
![Page 9: Code Review In Testing View](https://reader036.fdocuments.in/reader036/viewer/2022062312/553992b5550346b4378b49fc/html5/thumbnails/9.jpg)
Example: Database
Database Objects Convension
SP Parameter and Column Length/DataType
Usage of Index [Performance Issues]
Usage of SubQuery/Join [Performance Issues]
tblUsers
UserName: varchar(10)
usp_CreateUser
UserName: varchar(8)
![Page 10: Code Review In Testing View](https://reader036.fdocuments.in/reader036/viewer/2022062312/553992b5550346b4378b49fc/html5/thumbnails/10.jpg)
So…..
So, we need programmer as testing
guy now?- BIG NO!!
Distribute task accordingly.
![Page 11: Code Review In Testing View](https://reader036.fdocuments.in/reader036/viewer/2022062312/553992b5550346b4378b49fc/html5/thumbnails/11.jpg)
Advantages
Attached with development procedures from early stage.
Thus gain more knowledge on implementing requirements.
Helps in quick bug tracing. Also helps testing guys to be more:
Skilled Analytical Efficient
![Page 12: Code Review In Testing View](https://reader036.fdocuments.in/reader036/viewer/2022062312/553992b5550346b4378b49fc/html5/thumbnails/12.jpg)
QA [not Quality Assurance it’s Question Answer..]