code review in testing view

12
Company LOGO Md. Rizwanur Rashid Enosis Solutions [http://www.rizviews.com] Code Review in [Testing View ]

Upload: sqabd

Post on 22-Apr-2015

1.421 views

Category:

Documents


2 download

DESCRIPTION

SQABD Lightning Talks 3 www.sqabd.com

TRANSCRIPT

Page 1: Code Review In Testing View

Company

LOGO

Md. Rizwanur Rashid

Enosis Solutions[http://www.rizviews.com]

Code Review in [Testing View]

Page 2: Code Review In Testing View

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

Code Review

Page 4: Code Review In Testing View

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

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

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

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

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

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

So…..

So, we need programmer as testing

guy now?- BIG NO!!

Distribute task accordingly.

Page 11: Code Review In Testing View

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

QA [not Quality Assurance it’s Question Answer..]