Test Automation Best Practices (high-level presentation)

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

2 comments

Comments 1 - 2 of 2 previous next Post a comment

  • + lfingerman lfingerman 2 months ago
    Hello,
    that’s a very good question.
    So the whole point behind an automation framework is its extensibility, i.e. you actually want your framework to handle any kind of applications including non-GUI based applications. If you look at slide #7 it shows that an extensible automation framework handles multiple layers of your application like middleware and data layer
    Let me ask you some more questions:
    1. What does this product do with the ERP app ?
    2. Does this product have any hooks (maybe an API or it’s command-driven) ?
    3. Are you free to use any test tools or your company already set a tool standard ?
    4. What’s your role in the company - do you have freedom to create/augment an automation framework yourself ?


    Regards,
    Leonard
  • + MVPOnline MVPOnline 2 months ago
    Hi Leonard,

    I’m new to the test automation framework space. I’m trying to come up with an automation solution for a product that exists within an ERP system, but does not actually interact with the ERP system interface. This rules out the use of record/playback scripting, because that would only test the system interface. The application in question makes calls into the ERP, as well as calls to external apps, plus the ERP system database tables, forms, structures, and views.

    My question is - Can a keyword-driven (or data-driven) type of test automation framework exist to test the application but be interface-independent (i.e. non-GUI)?
Post a comment
Embed Video
Edit your comment Cancel

3 Favorites

Test Automation Best Practices (high-level presentation) - Presentation Transcript

  1. Test Automation Best Practices by Leonard Fingerman Email: esmlf@yahoo.com
  2. Why Automate Testing ?
    • Improve software quality by reducing time to market
    • Improve reliability and consistency of testing processes
    • Allow manual testers do more complex & more suited for human kinds of tests (exploratory, usability etc.)
    • Enforce SLAs (service level agreements)
    • Ultimate goal is to save your business $$$...
  3. Common Types of Automated Testing
    • Unit Testing (xUnit, TestNG etc)
    • Performance Testing (LoadRunner, WebLoad etc)
    Functional System Testing (via UI, API, Web Services or Database) Model-based Regression
  4. Some Functional Automated Test Tools
    • No GUI Object repository
    • Only web application support
    • Good browser support
    • Good language support (Java, Ruby,C# )
    • Can be easily extended as JUnit suite
    • Open-source
    Selenium RC & IDE
    • VisualBasic scripting is limited
    • No IDE (may change in new release)
    • Licensed Product
    • Supports Web 2.0, Java or .NET applications
    • Full GUI Object Map repository
    • Seamless integration with QualityCenter
    HP/Mercury Quick Test Pro (QTP)
    • Insufficient browser support
    • Licensed product
    • Built as Eclipse Plug-In with full IDE and Java support
    • Supports Web 2.0, Java or .NET applications
    • Full GUI Object Map repository
    IBM/Rational Functional Tester (RFT) Cons Pros Tool
  5. You selected a tool…now what?
    • A tool is supposed to do it all, right… ?
    • Don’t fall into tool vendor’s sales pitch …remember Record & Playback is not real test automation
    • According to recent IDT study ( www.idtus.com )
  6. How to ensure success of TA project
      • Essentially automated test system is a piece of software designed to test your application  treat it as such
      • Evaluate an automated tool
        • POC (proof of concept) based on your native apps
        • Choose a tool that fits your business requirements & technical expertise
      • Plan
        • Establish goals & objectives ; budget; use or hire competent resources
        • Be ready to have quality metrics to validate the ROI (return of investment)
      • Design
        • Keep in mind the user community of TA system (Usability)
        • Choose an architecture that reduces maintenance and is extensible
      • Implement
        • Practice OOD principles of reusability & modularity (employ encapsulation & abstraction)
        • Introduce version control of your code
        • Establish code review process
      • Test & Maintain
        • Unit test your code
        • Constantly re-evaluate reasons for maintenance and improve TA architecture to minimize maintenance
  7. Note: the tool is abstracted by higher-level framework component library
  8. Data-driven automation framework
      • Automation is data-centric
      • User defines just data sets to drive tests with
      • Will have an external data source (DB tables, Excel spreadsheets, XML for data sets)
      • Flow control (navigation) is normally done by the test script not by the data source
      • Ex: data set exercises creation of new sales accounts functionality; stored in a DB table account_data
    MA Boston 02111 2332 Washington st Mick Jagger Jr. RollingStones Inc. GA Atlanta 30075 5775 Main st Phil Collins Genesis Inc. State City Zip Street PrimarySalesPerson CompanyName
  9. RFT code snippet
    • public void testMain(Object[] args)
    • {
    • String name;String primarySalesPerson;String address;String zip;String city;String state;
    • String query = "Select * from account_data";String AccessDBPath = Constants.FL_DB_PATH;
    • //Data abstraction class DataHandler – methods process data and return data values
    • DataHandler dlrAcctData = new DataHandler (AccessDBPath,query);
    • ArrayList listDlrAcctData = dlrAcctData.getRowsOfData();
    • try {
    • for ( int i=0;i<listDlrAcctData.size();i++){
        • coName = dlrAcctData.getValueForColumnName(i,“CompanyName&quot;);
        • primarySalesPerson = dlrAcctData.getValueForColumnName(i,&quot;primarySalesPerson&quot;);
        • Type.text(CustomerCreate. field_name (),coName );
        • Click.object(CustomerCreate. image_primarySalesPersonIcon () );
        • Type.text(text_employeeModalPanelCommonN(),primarySalesPerson);
      • }
    • dlrAcctData .closeDB();
    • }
  10. Keyword-driven automation framework
      • Automation is action-centric
      • De-compose your test cases/modules into granular re-usable keywords
      • The idea is for non-coders to be able to create automated test cases with action keywords
      • User defines flow control of the test via action keywords
      • Example: Test Case “Verify Checking Account Balance”
      • Enter Username and Password and Click submit button  step 1 is action Login
      • Enter “Phil Collins” as a Sales Person and Click Submit button
      • Verify the Sales Person was successfully created and Logout
      • So you may want to choose the following re-usable action keywords:
      • EnterText , Click , Login , VerifyExists
  11. Keyword-driven automation framework
      • May have an external data source (DB tables, Excel spreadsheets, XML for data sets) with action keywords e.g.
    .url:=.*createdSalesPerStatus.html .id:=SubmitSalesPer Button Click CreateSalesPerson Click Submit 3 UserLogin Module .value:=User Created Successfully .id:=CreationStatus DIV VerifyExists CreateSalesPersonStatus Verify Sales Person Creation Successful 4   .value:=Phil Collins .text:=SalesPerName Field EnterText CreateSalesPerson Enter New Sales Person data 2 .text:=Login Successful .id:=LoginSubmit N/A Login Home Login 1 Expected Object Type Action Page Description Step
  12. Hybrid automation framework
    • Combines the best of both worlds
      • User defines data sets to drive tests with
      • User also defines flow control of the test via action keywords
      • May have an external data source (DB tables, Excel spreadsheets, XML for data sets) with action keywords in addition to generic and test case specific data sets
  13. Q & A

+ lfingermanlfingerman, 6 months ago

custom

1329 views, 3 favs, 0 embeds more stats

Today we hear a lot of buzz about the latest & grea more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 1329
    • 1329 on SlideShare
    • 0 from embeds
  • Comments 2
  • Favorites 3
  • Downloads 149
Most viewed embeds

more

All embeds

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories