Posts

Integration of Testing Process in Sprint

Integration of Testing Process in Sprint 1. Understanding the stories context from testability perspective Phase: Sprint Planning Stories should be understood from end users perspective It should be clear for testers, what are the changes and the reasons behind those changes Missing test requirements (e.g. login / password, contest id, test environment accessibility, access to new features etc.) What should be done to overcome the requirements? Track missing requirements and make it available as soon as possible Features or requirements or part of requirements is not testable (e.g. not permissible to login to Salesforce etc.) 2. Create a running document, containing clarifications and its resolution Phase: Sprint Planning A document that contain history of all questions or concerns being raised A reference document for tester, when in doubt Document for product owner to know how well equipped his / her testers are 3. Add notes to testers, testing ideas or

Refactoring Methods

Refactoring List Composing Methods Properly Extract Method Turn the fragment into a method whose name explains the purpose of the method Benefit is that original method become shorter and easier to comprehend Inline Method A method's body is just as clear as its name Put the method's body into the body of its callers and remove the method Inline Temp You have a temp that is assigned to once with a simple expression and the temp is getting in the way of other refactorings Replace all references to that temp with the expression Replace Temp with Query You are using a temporary variable to hold the result of an expression Extract the expression into a method. Replace all references to the temp with the expression. The new method can then be used in other methods By replaceing the temp with a query method, any method in the class can get the information cleanly Introduce Explaining Variable Put the result of the complicated expression, or parts of the

List of Code Smells

Bad Smells in Code Duplicate Code Identical or very similar code exists in more than one location Can use 'Extract Method' refactoring Long Method A method, function or procedure that has grown too large Good naming of method is a key over here Instead of comment, add method with name explaining intention of the code Look for conditional and loops expressions Large Class When a class is trying to do too much, it often shows up as too many instance variables, sometimes call as 'God' object Check if few attributes can be segregated as another component or another subclass For GUI class, you may need to move data and behavior to a separate domain object Long Parameter List A long list of parameters in a procedure or function make readability and code quality worse In object oriented programs, parameters list tend to much smaller than procedural language If possible, remove parameter(s) and let receiver invoke method(s) to get values by