Test Automation Frame [Repost]

xiaoxiao2021-03-06  125

Test Automation Frameworks

"WHEN Developing Our Test Strategy, WE Must Minimize The Impact Caused by Changes in The Applications WE Use to Test Them." - CARL J. Nagle

1.1 Thinking Past "The Project"

In today's environment of plummeting cycle times, test automation becomes an increasingly critical and strategic necessity. Assuming the level of testing in the past was sufficient (which is rarely the case), how do we possibly keep up with this new explosive pace of web- enabled deployment while retaining satisfactory test coverage and reducing risk? The answer is either more people for manual testing, or a greater level of test automation. After all, a reduction in project cycle times generally correlates to a reduction of time for test.

With the onset and demand for rapidly developed and deployed web clients test automation is even more crucial. Add to this the cold, hard reality that we are often facing more than one active project at a time. For example, perhaps the team is finishing up Version 1.0, adding the needed new features to version 1.1, and prototyping some new technology! For version 2.0!

Better still; maybe our test team is actually a pool of testers supporting many diverse applications completely unrelated to each other If each project implements a unique test strategy, then testers moving among different projects can potentially be more a hindrance rather than a help The.. THE NEDEDI THE New Environment Just May Not Be the. and, IT MAY SURELY DETRACT from the New Tester Up to Speed.

To handle this chaos we have to think past the project. We can not afford to engineer or reengineer automation frameworks for each and every new application that comes along. We must strive to develop a single framework that will grow and continuously improve with each application and every DiversE Project That Challenges Us. We Well See The Advantages and Disadvantages of these Different Approaches In Section 1.21.1.1 Problems with Test Automation

Historically, test automation has not met with the level of success that it could. Time and again test automation efforts are born, stumble, and die. Most often this is the result of misconceived perceptions of the effort and resources necessary to implement a successful, LONG-Lasting Automation Framework. why is this, WE Might Ask? Well, There Are Several Reasons.

Foremost among this list is that automation tool vendors do not provide completely forthright demonstrations when showcasing the "simplicity" of their tools. We have seen the vendor's sample applications. We have seen the tools play nice with those applications. And we try to get the Tools to Play Nice with Our Applications Just As Fluently. Inherently, Project After Project, We do Not Achieve The Same Level of Success.

This usually boils down to the fact that our applications most often contain elements that are not compatible with the tools we use to test them. Consequently, we must often mastermind technically creative solutions to make these automation tools work with our applications. Yet, this is Rarely Ever exercioned in the Litrature or the sales pitch.

The commercial automation tools have been chiefly marketed for use as solutions for testing an application. They should instead be sought as the cornerstone for an enterprise-wide test automation framework. And, while virtually all of the automation tools contain some scripting language allowing us to get past each tool's failings, testers have typically neither held the development experience nor received the training necessary to exploit these programming environments. "For the most part, testers have been testers, not programmers. Consequently, the 'simple' commercial solutions have been far Too Complex to Implement and Maintain; and They Become Shelfware. "

Most unfortunate of all, otherwise fully capable testers are seldom given the time required to gain the appropriate software development skills. For the most part, testers have been testers, not programmers. Consequently, the "simple" commercial solutions have been far too complex to IMPLEMENT AND MAINTAIN; and the become shelfware.

Test Automation Must Be Approached AS A Full-Blown Software Development Effort in Its Own Right. Without this, it is most likely destined to failure in the long Term.

Case Study: Costly Automation Failures

In 1996, one large corporation set out evaluating the various commercial automation tools that were available at that time. They brought in eager technical sales staff from the various vendors, watched demonstrations, and performed some fairly thorough internal evaluations of each tool.

By 1998, they had chosen one particular vendor and placed an initial order for over $ 250,000 worth of product licensing, maintenance contracts, and onsite training The tools and training were distributed throughout the company into various test departments -. Each working on their own projects .None of these test projects had anything in common. The applications were vastly different. The projects each had individual schedules and deadlines to meet. Yet, every one of these departments began separately coding functionally identical common libraries. They made routines for setting up the Windows test environment They each made routines for accessing the Windows programming interface They made file-handling routines, string utilities, database access routines -.. the list of code duplication was disheartening!

For their test designs, they each captured application specific interactive tests using the capture / replay tools. Some groups went the next step and modularized key reusable sections, creating reusable libraries of application-specific test functions or scenarios. This was to reduce the amount of code duplication and maintenance that so profusely occurs in pure captured test scripts. For some of the projects, this might have been appropriate if done with sufficient planning and an appropriate automation framework. But this was seldom the case.

With all these modularized libraries testers could create functional automated tests in the automation tool's proprietary scripting language via a combination of interactive test capture, manual editing, and manual scripting.

One problem was, as separate test teams they did not think past their own individual projects And although they were each setting up something of a reusable framework, each was completely unique -.! Even where the common library functions were the same This meant duplicate development, duplicate debugging, and duplicate maintenance. understandably, each separate project still had looming deadlines, and each was forced to limit their automation efforts in order to get real testing done.As changes to the various applications began breaking automated tests, script maintenance and debugging became a significant challenge. Additionally, upgrades in the automation tools themselves caused significant and unexpected script failures. in some cases, the necessity to revert back (downgrade) to older versions of the automation tools was indicated. Resource allocation for continued test development and Test Code Maintenance Became A Difficult Issue.

Eventually, most of these automation projects were put on hold By the end of 1999 -. Less than two years from the inception of this large-scale automation effort - over 75% of the test automation tools were back on the shelves waiting for A New Chance to try Again at some later date.

1.1.2 Some Test Strategy Guidelines

Past failings like these have been lessons for the entire testing community. Realizing that we must develop reusable test strategies is no different than the reusability concerns of any good application development project. As we set out on our task of automating test, we must keep these Past Lessons Forefront.

In order to make the most of our test strategy, we need to make it reusable and manageable To that end, there are some essential guiding principles we should follow when developing our overall test strategy:. Test automation is a fulltime effort, not a sideline . The test design and the test framework are totally separate entities. The test framework should be application-independent. The test framework must be easy to expand, maintain, and perpetuate. The test strategy / design vocabulary should be framework independent. The test strategy / Design Should Remove Most Testers from The Complexities of The Test Framework.

THESE Ideals Are Not relative, the is is used. Yet, it is sellom these principles are fully understood and instruction.

So What Do Theien?

1.1.3 Test Automation IS A FullTime Effort, Not a Sideline.

While not necessarily typical design criteria, it bears repeating. The test framework design and the coding of that design together require significant front-loaded time and effort. These are not things that someone can do when they have a little extra time here, or there ....., or between projects The test framework must be well thought out It must be documented It should be reviewed It should be tested It is a full software development project like any other This bears repeating -. again.

Will Our Test Framework Development Have All of these Wonderful Documentation, Design, REVIEW, AND TEST Processes? Does Our Application Development Team?

We Should Continuously Push for Both Endeavors to Implement All these critical practices.

1.1.4 The Test Design and The Test Framework Are Totally Separate Entities.

The test design details how the particular functions and features of our application will be tested. It will tell us what to do, how and when to do it, what data to use as input, and what results we expect to find. All of this is specific to the particular application or item being tested. Little of this requires any knowledge or care of whether the application will be tested automatically or manually. It is, essentially, the "how to" of what needs to be tested in the application. On the other hand, the test framework, or specifically, the test automation framework is an execution environment for automated tests. It is the overall system in which our tests will be automated. The development of this framework requires completely different technical skills than those needed For test design.

1.1.5 The Test Framework Should Be Application-Independent.

Although applications are relatively unique, the components that comprise them, in general, are not. Thus, we should focus our automation framework to deal with the common components that make up our unique applications. By doing this, we can remove all application-specific ................ ..

"We Should Focus Our Automation Framework to DEAL with The Common Components That Make Up Our Unique Applications."

Nearly all applications come with some form of menu system. They also have buttons to push, boxes to check, lists to view, and so on. In a typical automation tool script there is, generally, a very small number of component functions for each type of component. These functions work with the component objects independent of the applications that contain them.Traditional, captured automation scripts are filled with thousands of calls to these component functions. So the tools already exist to achieve application independence. The problem is, most of these scripts construct the function calls using application-specific, hard coded values. This immediately reduces their effectiveness as application-independent constructs. Furthermore, the functions by themselves are prone to failure unless a very specific application state or synchronization exists at the time they Are EXECUTED. There is Little Error Correction or Prevention Built-in to these functions.

To deal with this in traditional scripts we must place additional code before and / or after the command, or a set of commands, to insure the proper application state and synchronization is maintained. We need to make sure our window has the current focus. We .

For maximum robustness, we would have to code these state and synchronization tests for every component function call in our scripts. Realistically, we could never afford to do this. It would make the scripts huge, nearly unreadable, and difficult to maintain. Yet, where we forego this extra effort, we increase the possibility of script failure.What we must do is develop a truly application-independent framework for these component functions. This will allow us to implement that extra effort just once, and execute it for every call to any component function. This framework should handle all the details of insuring we have the correct window, verifying the element of interest is in the proper state, doing something with that element, and logging the success or failure of the entire activity.

We do this by using variables, and providing application-specific data to our application-independent framework. In essence, we will provide our completed test designs as executable input into our automation framework.

Does this mean that we will never have to develop application-specific test scripts? Of course not. However, if we can limit our application-specific test scripts to some small percentage, while reusing the best features of our automation framework, we will reap The Rewards ProjectAfter Project.

1.1.6 Test Framework Must Be Easy To Expand, Maintain, and Perpetuate.

One of our goals should be a highly modular and maintainable framework. Generally, each module should be independent and separate from all the other modules. What happens inside one is of no concern to the others.

With this modular black-box approach, the functionality available within each module can be readily expanded without affecting any other part of the system. This makes code maintenance much simpler. Additionally, the complexity of any one module will likely be quite minimal.However, modularity alone will not be enough to ensure a highly maintainable framework. Like any good software project, our design must be fully documented and published. Without adequate, published documentation it will be very difficult for anyone to decipher what it is the framework is designed to DO. Any Hope of Maintenance Will NOT Last Far Beyond The Departure of the Original Framework Designers. Our test Automation Efforts Will Eventually Become Another Negative Statistic.

To prevent this, we should define documentation standards and templates. Wherever possible, module documentation should be developed "in-context". That is, directly in the source code itself. Tools should be retained, or designed and developed, so that we can automatically extract and publish the documentation This will eliminate the task of maintaining two separate sets of files:. the source code, and its documentation It will also provide those doing the code maintenance quite a ready reference Nearly everything they need to know should exist.. Right there.

"WE Must Always Remember: Our Ultimate Goal Is To Simplify and Perpetuate a successful automation framework."

We must always remember:. Our ultimate goal is to simplify and perpetuate a successful test automation framework To put something in place that people will use and reuse for as long as it is technically viable and productive.

1.1.7 The test strategy / design vocabulary should be framework independent.As noted before, the framework refers to the overall environment we construct to execute our tests. The centerpiece is usually one of many commercially available automation tools. In good time, it may ...............

The point is, different tools exist and some will work better for us than others in certain situations. While one tool might have worked best with our Visual Basic or C / C applications, we may need to use a different tool for our web clients. .

The overall test strategy will define the format and low-level vocabulary we use to test all applications much like an automation tool defines the format and syntax of the scripting language it provides. Our vocabulary, however, will be independent of any particular test framework employed . The same vocabulary will migrate with us from framework to framework, and application to application. This means, for example, the syntax used to click a button will be the same regardless of the tool we use to execute the instruction or the application that contains The button.

The test design for a particular application, however, will define a high-level vocabulary that is specific to that application. While this high-level vocabulary will be application specific, it is still independent of the test framework used to execute it. This means that the high-level instruction to login to our website with a particular user ID and password will be the same regardless of the tool we use to execute it.When we provide all the instructions necessary to test a particular application, we should be able to use the exact same instructions on any number of different framework implementations capable of testing that application. We must also consider the very likely scenario that some or all of this testing may, at one time or another, be manual testing. This means that our overall Test Strategy Should Not Only Facilitate Test Automation, IT Should Also Support Manual Testing.

Consequently, the format and vocabulary we use to test our applications should be intuitive enough for mere mortals to comprehend and execute. We should be able to hand our test over to a person, point to an area that failed, and that person should be able To Manually Reproduce The Steps Necessary to duplicate the fail.

"A Good Test Strategy Can Remove The Necessity for Both Manual and Automated Test Scripts. The Same 'Script' Should Suffice for Both."

A good test strategy, comprised of our test designs and our test framework, can remove the necessity for both manual and automated test scripts for the same test. The same "script" should suffice for both. The important thing is that the vocabulary is independent Of the framework used to execute it. and the test statulegy Must Also Acccommodate Manual Testing.

1.1.8 The test strategy / design should remove most testers from the complexities of the test framework.In practice, we can not expect all our test personnel to become proficient in the use of the automation tools we use in our test framework. In some cases ., this is not even an option worth considering Remember, generally, testers are testers - they are not programmers Sometimes our testers are not even professional testers Sometimes they are application domain experts with little or no use for the technical skills needed for.. Software development.

Sometimes testers are application developers splitting time between development and test. And when application developers step in to perform testing roles, they do not want or need a complex test scripting language to learn. That is what you get with commercial automation tools. And that may Even Be counter-Productive and Pripote Confusion Since Some of these Scripting Languages ​​Are Modified Subsets of Standard Programming Languages. Others Are Completely Unique and ProPrietary.

Yet, with the appropriate test strategy and vocabulary as discussed in the previous section, there is no reason we should not be able to use all our test resources to design tests suitable for automation without knowing anything about the automation tools we plan to deploy.

........................ ..

1.2 Data Driven Automation Frameworks

Over the past several years there have been numerous articles done on various approaches to test automation. Anyone who has read a fair, unbiased sampling of these knows that we can not and must not expect pure capture and replay of test scripts to be successful for the life of a product. We will find nothing but frustration there.Sometimes this manifesto is hard to explain to people who have not yet performed significant test automation with these capture / replay tools. But it usually takes less than a week, often less than a day , To hear the most serious phrase: "IT WORKED WHEN I Recorded It, But Now It Fails When i Play It Back!"

Obviously, we are not going to get the ex.

1.2.1 Data Driven Scripts

Data driven scripts are those application-specific scripts captured or manually coded in the automation tool's proprietary language and then modified to accommodate variable data. Variables will be used for key application input fields and program selections allowing the script to drive the application with external data supplied By The Calling Routine or The Shell That Invoked The Test Script.

Variable Data, Hard Coded Component Identification:. These data driven scripts often still contain the hard coded and sometimes very fragile recognition strings for the window components they navigate When this is the case, the scripts are easily broken when an application change or revision occurs. And WHESE SCRIPTS Start Breaking, WE Are Not Necessarily Talking About Just A Few. We Are Sometimes Talking About a Great Many, IF NOT All The Scripts, for the entire Application.

Figure 1 IS An Example of Activating a Server-Side Image Map Link In A Web Application With an Automation Tool Scripting Language:

Image Click "DocumentTitle = Welcome; /; ImageIndex = 1" "COORDS = 25, 20" Figure 1

This particular scenario of clicking on the image map might exist thousands of times throughout all the scripts that test this application. The preceding example identifies the image by the title given to the document and the index of the image on the page. The hard coded image identification might work successfully all the way through the production release of that version of the application. Consequently, testers responsible for the automated test scripts may gain a false sense of security and satisfaction with these results.

However, the next release cycle may find some or all of these scripts broken because either the title of the document or the index of the image has changed. Sometimes, with the right tools, this might not be too hard to fix. Sometimes, no Matter What Tools, IT Will Be Frust Indult.

Remember, WE Are Potentially Talking About Thousands of Broken Lines of Test Script code. And this is just one, there. Where there is one, There will likely be ter.

Highly Technical or Duplicate Test Designs: Another common feature of data driven scripts is that virtually all of the test design effort for the application is developed in the scripting language of the automation tool Either that, or it is duplicated in both manual and automated script. versions. This means that everyone involved with automated test development or automated test execution for the application must likely become proficient in the environment and programming language of the automation tool.

Findings:. A test automation framework relying on data driven scripts is definitely the easiest and quickest to implement if you have and keep the technical staff to maintain it But it is the hardest of the data driven approaches to maintain and perpetuate and very often leads to Long-Term Failure.1.2.2 Keyword or Table Driven Test Automation

Nearly everything discussed so far defining our ideal automation framework has been describing the best features of "keyword driven" test automation. Sometimes this is also called "table driven" test automation. It is typically an application-independent automation framework designed to process our tests . These tests are developed as data tables using a keyword vocabulary that is independent of the test automation tool used to execute them. This keyword vocabulary should also be suitable for manual testing, as you will soon see.

Action, Input Data, and Expected Result ALL in One Record: The data table records contain the keywords that describe the actions we want to perform They also provide any additional data needed as input to the application, and where appropriate, the benchmark information we. Use to verify the state of outness.

For Example, To Verify The Value of a User ID TEXTBOX ON A Login Page, WE Might Have A Data Table Record As Seen in Table 1:

Window Component Action Expected Value LoginPage User 2TextBox VerifyValue "MyUserID"

TABLE 1

Reusable Code, Error Correction and Synchronization:. Application-independent component functions are developed that accept application-specific variable data Once these component functions exist, they can be used on each and every application we choose to test with the framework.Figure 2 presents pseudo -code that would interpret the data table record from Table 1 and Table 2. In our design, the primary loop reads a record from the data table, performs some high-level validation on it, sets focus on the proper object for the instruction, and then routes the complete record to the appropriate component function for full processing. The component function is responsible for determining what action is being requested, and to further route the record based on the action.

Framework Pseudo-Code Primary Record Processor Module: Verify "LoginPage" Exists (Attempt recovery if not) Set focus to "LoginPage" Verify "UserIDTextbox" Exists (Attempt recovery if not) Find "Type" of component "UserIDTextbox".... (It is a Textbox) Call the module that processes ALL Textbox components Textbox Component Module:.. Validate the action keyword "VerifyValue" Call the Textbox.VerifyValue function Textbox.VerifyValue function:. Get the text stored in the "UserIDTextbox" Textbox. Compare the retrieved text to "myuserid". Record Our Success OR Failure.

Figure 2

Test Design for Man and Machine, With 2 Reiterate The Actual Data Table Record Run by The Automation Framework Above:

Window Component Action Expected Value LoginPage User 2TextBox VerifyValue "MyUserID"

Table 2

. Note how the record uses a vocabulary that can be processed by both man and machine With minimal training, a human tester can be made to understand the record instruction as deciphered in Figure 3: On the LoginPage, in the UserIDTextbox, Verify the Value is "Myuserid".

Figure 3

Once The Learn OR CAN Reference This Simple Vocabulary, Tester Can Start Designing Tests WITOUT KNOWING Anything About The Automation Tool Used to Execute Them.

Another advantage of the keyword driven approach is that testers can develop tests without a functioning application as long as preliminary requirements or designs can be determined. All the tester needs is a fairly reliable definition of what the interface and functional flow is expected to be like. From this They Can Write Most, IF Not All, of The Data Table Test Records.

Sometimes it is hard to convince people that this advantage is realizable. Yet, take our login example from Table 2 and Figure 3. We do not need the application to construct any login tests. All we have to know is that we will have a login form of some kind that will accept a user ID, a password, and contain a button or two to submit or cancel the request. A quick discussion with development can confirm or modify our determinations. We can then complete the test table and move on to Another.

We can develop other tests similarly for any part of the product we can receive or deduce reliable information. In fact, if in such a position, testers can actually help guide the development of the UI and flow, providing developers with upfront input on how users might expect the product to function. and since the test vocabulary we use is suitable for both manual and automated execution, designed testing can commence immediately once the application becomes available.It is, perhaps, important to note that this does not suggest that these tests can be executed automatically as soon as the application becomes available. The test record in Table 2 may be perfectly understood and executable by a person, but the automation framework knows nothing about the objects in this record until we can provide that additional information. that is A Separate Piece of The Framework We Well Learn About When We discuss Application Mapping.

Findings:. The keyword driven automation framework is initially the hardest and most time-consuming data driven approach to implement After all, we are trying to fully insulate our tests from both the many failings of the automation tools, as well as changes to the application ITSelf.

TO Accomplish this, we are essential, enhancements to many the component funtements, prevention, and enhanced synchronization.

Fortunately, this heavy, initial investment is mostly a one-shot deal. Once in place, keyword driven automation is arguably the easiest of the data driven frameworks to maintain and perpetuate providing the greatest potential for long-term success.

Additionally, there may now be commercial products suitable for your needs to decrease, but not eliminate, much of the up-front technical burden of implementing such a framework. This was not the case just a few years ago. We will briefly discuss a couple Of these in section 1.2.41.2.3 Hybrid test Automation (OR, "All of the Above")

The most successful automation frameworks generally accommodate both keyword driven testing as well as data driven scripts. This allows data driven scripts to take advantage of the powerful libraries and utilities that usually accompany a keyword driven architecture.

The framework utilities can make the data driven scripts more compact and less prone to failure than they otherwise would have been. The utilities can also facilitate the gradual and manageable conversion of existing scripts to keyword driven equivalents when and where that appears desirable.

On the other hand, the framework can use scripts to perform some tasks that might be too difficult to re-implement in a pure keyword driven approach, or where the keyword driven capabilities are not yet in place.

1.2.4 Commercial Keyword Driven Frameworks

Some commercially available keyword driven frameworks are making inroads in the test automation markets. These generally come from 3rd party companies as a bridge between your application and the automation tools you intend to deploy. They are not out-of-the-box, turnkey automation Solutions Just As The Capture / Replay Tools Are Not Turnkey Solutions.

They still require some up-front investment of time and personnel to complete the bridge between the application and the automation tools, but they can give some automation departments and professionals a huge jumpstart in the right direction for successful long-term test automation.Two particular products to note are the TestFrameä product led by Hans Buwalda of CMG Corp, and the Certifyä product developed with Linda Hayes of WorkSoft Inc. These products each implement their own version of a keyword driven framework and have served as models for the subject at international software Testing conferences, and user-group discussions worldwide. I'm Sure the is

It really is up to the individual enterprise to evaluate if any of the commercial solutions are suitable for their needs. This will be based not only on the capabilities of the tools evaluated, but also on how readily they can be modified and expanded to accommodate your CURRENT AND Projected Capability Requirements.

1.3 Keyword Driven Automation Framework Model

The following automation framework model is the result of over 18 months of planning, design, coding, and sometimes trial and error That is not to say that it took 18 months to get it working -. It was actually a working prototype at around 3 Person-months. Specifically, One Person Working On It for 3 Months!

The model focuses on implementing a keyword driven automation framework. It does not include any additional features like tracking requirements or providing traceability between automated test results and any other function of the test process. It merely provides a model for a keyword driven execution engine for automated Tests.

The Commercially Available Frameworks Generally Have Many More Features And Much Broader Scope. Of Course, The Also Have The Price Tag To Reflect this...............

The Project Was Informally Tasked to Follow The Guidelines or Practices Below:

Implement a test strategy that will allow reasonably intuitive tests to be developed and executed both manually and via the automation framework. The test strategy will allow each test to include the step to perform, the input data to use, and the expected result all together in one line or record of the input source. Implement a framework that will integrate keyword driven testing and traditional scripts, allowing both to benefit from the implementation. Implement the framework to be completely application-independent since it will need to test at least 4 or 5 different applications once deployed. The framework will be fully documented and published. The framework will be publicly shared on the intranet for others to use and eventually (hopefully) co-develop.

1.3.2 Code and Documentation Standards

The first thing we did was to define standards for source code files and headers that would provide for in-context documentation intended for publication. This included standards for how we would use headers and what type of information would go into them.

Each source file would start with a structured block of documentation describing the purpose of the module. Each function or subroutine would likewise have a leading documentation block describing the routine, its arguments, possible return codes, and any errors it might generate. Similar standards were Developed for Documenting The Constants, Variables, Dependencies, and Other Features of the Modules.

We then developed a tool that would extract and publish the documentation in HTML format directly from the source and header files. We did this to minimize synchronization problems between the source code and the documentation, and it has worked very well.It is beyond the scope of this work to illustrate how this is done. in order to produce a single HTML document we parse the source file and that source file's primary headers. We format and link public declarations from the headers to the detailed documentation in the source as well as link To any External References for Other Documentation. We Also Format and Group Public Constants, Properties or Variables, and user-defined Types Into the appropriate section of the html publication.

One nice feature about this is that the HTML publishing tool is made to identify the appropriate documentation blocks and include them pretty much "as is". This enables the inclusion of HTML tags within the source documentation blocks that will be properly interpreted by a browser. Thus, for publication purposes, we can include images or other html elements by Embedding the property tags.

1.3.3 Our Automation Framework

Figure 4 is a diagram representing the design of our automation framework. It is followed by a description of each of the elements within the framework and how they interact. Some readers may recognize portions of this design. It is a compilation of keyword driven automation concepts From SEVERAL SOURCES. THESE INCLUDE LINDA HAYES WITH WORKSOFT, ED KIT from Software Development Technolgies, Hans Buwalda from CMG CORP, Myseelf, And A Few Others.

Figure 4

In brief, the framework itself is really defined by the Core Data Driven Engine, the Component Functions, and the Support Libraries. While the Support Libraries provide generic routines useful even outside the context of a keyword driven framework, the core engine and Component Functions are highly dependent on the existence of all three elements.The test execution starts with the LAUNCH TEST (1) script. This script invokes the Core Data Driven Engine by providing one or more High-Level Test Tables to CycleDriver (2). CycleDriver processes these test tables invoking the SuiteDriver (3) for each Intermediate-Level Test Table it encounters. SuiteDriver processes these intermediate-level tables invoking StepDriver (4) for each Low-Level Test Table it encounters. As StepDriver processes these low-level tables it attempts TO Keep The Application In Synch with the Test. When Stepdriver Encounters a Low-Level Command for a Specific Component, IT Determines What Typent Is Involved and i NVokes The Corresponding Component Function (5) Module to Handle The Task.

All of these elements rely on the information provided in the App Map to interface or bridge the automation framework with the application being tested. Each of these elements will be described in more detail in the following sections.

1.3.4 The Application Map:. The Application Map is one of the most critical items in our framework It is how we map our objects from names we humans can recognize to a data format useful for the automation tool The testers for a given project. will define a naming convention or specific names for each component in each window as well as a name for the window itself. We then use the Application Map to associate that name to the identification method needed by the automation tool to locate and properly manipulate the correct object in the window.Not only does it give us the ability to provide useful names for our objects, it also enables our scripts and keyword driven tests to have a single point of maintenance on our object identification strings. Thus, if a new version of an application changes the title of our web page or the index of an image element within it, they should not affect our test tables The changes will require only a quick modification in one place -. inside the Applicati ON MAP.

Figure 5 shows a simple HTML page used in one frame of a HTML frameset. Table 3 shows the object identification methods for this page for an automation tool. This illustrates how the tool's recorded scripts might identify multiple images in the header frame or top frame of . a multi-frame web page This top frame contains the HTML document with four images used to navigate the site Notice that these identification methods are literal strings and potentially appear many times in traditional scripts (a maintenance nightmare!).:

Simple Html Document With Four images

Figure 5

Script referencing HTML Document Components with Literal Strings OBJECT IDENTIFICATION METHOD Window "WindowTag = WebBrowser" Frame "FrameID = top" Image "FrameID = top; /; DocumentTitle = topFrame" Image "FrameID = top; /; DocumentTitle = topFrame; /; ImageIndex = 1 "Image" frameID = top; /; DocumentTitle = topFrame; /; ImageIndex = 2 "Image" frameID = top; /; DocumentTitle = topFrame; /; ImageIndex = 3 "Image" frameID = top; /; DocumentTitle = topFrame ; /; ImageIndex = 4 "Table 3

This particular web page is simple enough. It contains only four images. However, when we look at Table 3, how do we determine which image is for Product information, and which is for Services? We should not assume they are in any particular order Based Upon How the is "consunelly. consequultly, Some" Trying to Decipher Or Maintain Scripts Containing these Identification Strings CAN Easily Get Confused.

An Application Map will give these elements useful names, and provide our single point of maintenance for the identification strings as shown in Table 4. The Application Map can be implemented in text files, spreadsheet tables, or your favorite database table format. The Support Libraries Just Have to Be Able To Extract and Cache The Information for When It Is Needed.

An Application Map Provides Named References for Components REFERENCE IDENTIFICATION METHOD Browser "WindowTag = WebBrowser" TopFrame "FrameID = top" TopPage "FrameID = top; /; DocumentTitle = topFrame" CompInfoImage "FrameID = top; /; DocumentTitle = topFrame; /; ImageIndex = 1 "ProductsImage" frameID = top; /; DocumentTitle = topFrame; /; ImageIndex = 2 "ServicesImage" frameID = top; /; DocumentTitle = topFrame; /; ImageIndex = 3 "SiteMapImage" frameID = top; /; DocumentTitle = topFrame ; /; ImageIndex = 4 "Table 4

With the preceding definitions in place, the same scripts can use variables with values ​​from the Application Map instead of those string literals. Our scripts can now reference these image elements as shown in Table 5. This reduces the chance of failure caused by changes in the Application and provides a single point of maintenance in the application map for the identification strings used throughoutur tests. It can also make our scripts easier to read and understand.

Script Using Variable References Instead of Literal Strings OBJECT IDENTIFICATION METHOD Window Browser Frame TopFrame Document TopPage Image CompInfoImage Image ProductsImage Image ServicesImage Image SiteMapImage

Table 5

1.3.5 Component Functions: Component Functions are those functions that actively manipulate or interrogate component objects In our automation framework we will have a different Component Function module for each Type of component we encounter (Window, CheckBox, TextBox, Image, Link, etc. ..).

Our Component Function modules are the application-independent extensions we apply to the functions already provided by the automation tool. However, unlike those provided by the tool, we add the extra code to help with error detection, error correction, and synchronization. We also write these modules to readily use our application-specific data stored in the Application Map and test tables as necessary. in this way, we only have to develop these Component Functions once, and they will be used again and again by every application we test. Another benefit from Component Functions is that they provide a layer of insulation between our application and the automation tool. Without this extra layer, changes or "enhancements" in the automation tool itself can break existing scripts and our table driven tests. With these Component Functions , HOWEVER, WE CAN INSERT A "FIX" - The Channel That Will Avert Breaking Our Tests.

Component Function Keywords Define Our Low-Level Vocabulary: Each of these Component Function modules will define the keywords or "action words" that are valid for the particular component type it handles For example, the Textbox Component Function module would define and implement the actions. Or Keywords That Are Valid ON A TextBox. Thase Keywords Would Describe Actions Like Those in Table 6:

Some Component Function Keywords for a Textbox KEYWORD ACTION PERFORMED InputText Enter new value into the Textbox VerifyValue Verify the current value of the Textbox VerifyProperty Verify some other attribute of the Textbox

TABLE 6

Each action embodied by a keyword may require more information in order to complete its function. The InputText action needs an additional argument that tells the function what text it is suppose to input. The VerifyProperty action needs two additional arguments, (1) the name of the property we want to verify, and (2) the value we expect to find. and, while we need no additional information to Click a Pushbutton, a Click action for an Image map needs to know where we want the click on the image to occur.These Component Function keywords and their arguments define the low-level vocabulary and individual record formats we will use to develop our test tables. With this vocabulary and the Application Map object references, we can begin to build test tables that our automation framework and Our Human Testers CAN Understand and Properly Execute.

. 1.3.6 Test Tables: Low-level Test Tables or Step Tables contain the detailed step-by-step instructions of our tests Using the object names found in the Application Map, and the vocabulary defined by the Component Functions; these tables specify what document, what component, and what action to take on the component. The following three tables are examples of Step Tables comprised of instructions to be processed by the StepDriver module. The StepDriver module is the one that initially parses and routes all low-level instructions That Ultimately Drive Our Application.

Step Table: Launch Parameter / Action Parameter LaunchBrowser Default.htm Browser VerifyCaption "Login"

Table 7

Step Table: Login Document Component Action Parameter LoginPage Useridfield InputText "Myuserid" LoginPage Passwordfield InputText "Mypassword" loginpage SubmitButton ClickTable 8

Step Table: Logoffsite Document Component Action TOCPAGE LOGOFFB /TTON CLICK

Table 9

Note: In Table 7 we used a System-Level keyword, LaunchBrowser This is also called a Driver Command A Driver Command is a command for the framework itself and not tied to any particular document or component Also notice that test tables often consist... Of Records with Varying Numbers of Fields.

Intermediate-Level Test Tables or Suite Tables do not normally contain such low-level instructions. Instead, these tables typically combine Step Tables into Suites in order to perform more useful tasks. The same Step Tables may be used in many Suites. In this way WE Only Develop The Minimum Number of Step Tables Necessary. We the Mix-Match Them in Suites According To The Purpose and Design Of Our Tests, for Maximum Reusability.

The Suite Tables Are Handled by The Suiteriver Module Which Passes Each Step Table To The Stepdriver Module for Processing.

For Example, A Suite Using Two of the Preceding Step Tables Might Look Like Table 10:

Suite Table: Startsite Step Table Reference Table Purpose Launch Launch Web App for Test Login Login "MyUserId" to app

Table 10

Other Suites Might Combine Other Step Tables LIKE THESE:

Suite Table: VerifyTocpage Step Table Reference Table PurPose VerifyToccontent Verify Text In Table of Contents VerifyToClinks Verify Links in Table of Contents

Table 11

Suite Table: Shutdownsite Step Table Reference Table Purpose Logoffsite Logoff The Application EXITBROWSER CLOSE THE Web Browser

TABLE 12

High-Level Test Tables or Cycle Tables combine intermediate-level Suites into Cycles. The Suites can be combined in different ways depending upon the testing Cycle we wish to execute (Regression, Acceptance, Performance ...). Each Cycle will likely specify a different type or number of tests. These Cycles are handled by the CycleDriver module which passes each Suite to SuiteDriver for processing.A simple example of a Cycle Table using the full set of tables seen thus far is shown in Table 13.

CYCLE TABLE: SITEREGRESSION Suite Table Reference Table Purpose Startsite Launch Browser and Login for Test VerifyTocpage Verify Table of Contents Page Shutdownsite Logoff and Shutdown Browser

TABLE 13

1.3.7 The Core Data Driven Engine:

We have alleady talked About The Primary Purpose of Each of THEE MODULES THAT Make Up The Core Data Driven Engine Part of The Automation Framework. But let us Reiterate Some of That Here.

CycleDriver processes Cycles, which are high-level tables listing Suites of tests to execute. CycleDriver reads each record from the Cycle Table, passing SuiteDriver each Suite Table it finds during this process.

SuiteDriver processes these Suites, which are intermediate-level tables listing Step Tables to execute. SuiteDriver reads each record from the Suite Table, passing StepDriver each Step Table it finds during this process.

StepDriver processes these Step Tables, which are records of low-level instructions developed in the keyword vocabulary of our Component Functions. StepDriver parses these records and performs some initial error detection, correction, and synchronization making certain that the document and / or the component we plan to manipulate are available and active. StepDriver then routes the complete instruction record to the appropriate Component Function for final execution.Let us again show a sample Step Table record in Table 14 and the overall framework pseudo-code that will process it in Figure 6 .

Single Step Table Record Document Component Action Expected Value LoginPage User 2TextBox VerifyValue "Myuserid"

TABLE 14

Framework Pseudo-Code Primary Record Processor Module: Verify "LoginPage" Exists (Attempt recovery if not) Set focus to "LoginPage" Verify "UserIDTextbox" Exists (Attempt recovery if not) Find "Type" of component "UserIDTextbox".... (It is a Textbox) Call the module that processes ALL Textbox components Textbox Component Module:.. Validate the action keyword "VerifyValue" Call the Textbox.VerifyValue function Textbox.VerifyValue function:. Get the text stored in the "UserIDTextbox" Textbox. Compare the retrieved text to "myuserid". Record Our Success OR Failure.

Figure 6

In Figure 6 you may notice that it is not StepDriver that validates the action command or keyword VerifyValue that will be processed by the Textbox Component Function Module. This allows the Textbox module to be further developed and expanded without affecting StepDriver or any other part of the . framework While there are other schemes that might allow StepDriver to effectively make this validation dynamically at runtime, we still chose to do this in the Component Functions themselves.System-Level Commands or Driver Commands: in addition to this table-processing role, each Os of the Driver Modules Has ITS OWN Set of System-Level Keywords OR Commands Also Called Driver Commands. These Commands Instruct The Module To Do Something Other Than Normal Table Processing.

.. For example, the previously shown LaunchSite Step Table issued the LaunchBrowser StepDriver command This command instructs StepDriver to start a new Browser window with the given URL Some common Driver Commands to consider:

Common Driver Commands COMMAND PURPOSE UseApplicationMap Set which Application Map (s) to use LaunchApplication Launch a standard application LaunchBrowser Launch a web-based app via URL CallScript Run an automated tool script WaitForWindow Wait for Window or Browser to appear WaitForWindowGone Wait for Window or Browser to disappear Pause or Sleep Pause for a specified amount of time SetRecoveryProcess Set an AUT recovery process SetShutdownProcess Set an AUT shutdown process SetRestartProcess Set an AUT restart process SetRebootProcess Set a System Reboot process LogMessage Enter a message in the log

Table 15

These are just some examples of possible Driver Commands There are surely more that have not been listed and some here which you may not need implemented.All for One, and One for All:. This discussion on the Core Data Driven Engine has identified three separate modules (StepDriver, SuiteDriver, and CycleDriver) that comprise the Core. This does not, however, make this three-module design an automation framework requirement. It may be just as valid to sum up all the functionality of those three modules into one module OR Any Number of Discreet Modules More Suitable To The Framework Design Developed.

1.3.8 The Support Libraries: The Support Libraries Are The General-Purpose Routines And Utilities That Let The Overall Automation Framework Do What It Needs to Do. The Modules That Provides Like:

File Handling String Handling Buffer Handling Variable Handling Database Access Logging Utilities System / Environment Handling Application Mapping Functions System Messaging or System API Enhancements and Wrappers

They also provide traditional automation tool scripts access to the features of our automation framework including the Application Map functions and the keyword driven engine itself. Both of these items can vastly improve the reliability and robustness of these scripts until such time that they can be converted over To Keyword Driven Test Tables (IF and WHEN That Is Desirable).

1.4 Automation Framework Workflow

We have seen the primary features of our automation framework and now we want to put it to the test. This section provides a test workflow model that works very well with this framework. Essentially, we start by defining our high level Cycle Tables and provide more and more detail down to our Application Map and low-level Step Tables.For this workflow example, we are going to show the hypothetical test design that might make up security authentication tests for a web site. The order in which we present the information and ................. ..

1.4.1 High-Level Tests - CYCLE TABLE

We will start out by defining our high-level Cycle Table in Table 16. This will list tests that verify user authentication functionality. There is no application yet, but we do know that we will authenticate users with a user ID and password via some type Of login page. with this Much Information We can Start Designing Some Tests.

At this level, our tables are merely keywords or actions words of what we propose to do. The keywords represent the names of Suites we expect to implement when we are ready or when more is known about the application.

We will call this particular high-level test, VerifyAuthenticationFunction (Table 16). It will not show all the tests that should be performed to verify the user authentication features of a web site. Just enough to illustrate our test design process.

Cycle Table: VerifyAuthenticationFunction KEYWORDS (Suite Tables) TABLE PURPOSE VerifyInvalidLogin Tests with Invalid UserID and / or Password VerifyBlankLogin Tests with Missing UserID and / or Password VerifyValidLogin Tests with Valid UserID and PasswordTable 16

The preceding table illustrates that we plan to run three tests to verify the authentication functionality of our application. We may add or delete tests from this list in the future, but this is how we currently believe this functionality can be adequately verified.

1.4.2 Intermediate-Level Tests - Suite Tables

When we are ready to provide more detail for our authentication test effort we can begin to flesh-out the intermediate-level Suite Tables. Our high-level VerifyAuthenticationFunction Cycle Table defined three Suites that we must now expand upon.

First, We Plan to Verify Invalid login attempts - Those with an invalid user ID, invalid password, or both. This first suite is ready dubbed, verifyInvalidlogin (Table 17).

Second, WEWANT to Run A Simple Test Without Any User ID OR Password Whatsoever. This Second Suite Was Called, VerifyBLANKLOGIN (Table 18).

The Last Suite We Must Implement Is The One That Insures We CAN SUCCESSFULLY LOGIN WHEN WHEN WHEN WHEN WHEN WHEN WHENW PASSWORD. This One was named, VerifyValidLogin (Table 19).

Suite Table: VerifyInvalidLogin KEYWORDS (Step Tables) USERID PASSWORD LaunchSite Login BadUser GoodPassword VerifyLoginError Login GoodUser BadPassword VerifyLoginError Login BadUser BadPassword VerifyLoginError ExitLogin

Table 17

Suite Table: VerifyBLANKLOGIN Keywords (Step Tables) Userid Password Launch Login "" "VerifyLoginerror ExitLogin

Table 18

Suite Table: VerifyValidlogin Keywords (Step Tables) Userid Password Launch Login Gooduser Goodpassword VerifyLoginsuccess ShutdownsiteTable 19

Notice that we start to see a large amount of test table reuse here. While not yet defined, we can see that we will be using the LaunchSite, Login, VerifyLoginError, and ExitLogin tables quite frequently. As you can probably imagine, VerifyLoginSuccess and ShutdownSite .

You should also notice that our Login keyword is describing a Step Table that will accept up to two arguments -. The user ID and password we want to supply We have not gone into the specific design details of how the automation framework should be implemented, BUT TESTS Accepting Variable Data Like This Provide Significant Reuse Advantages. This Same Table is buy and password combinations.

1.4.3 Application Maps

Up to this point there was little need for an Application Map. Nearly all the high-level and intermediate-level test designs are abstract enough to forego references to specific window components. But as we move towards our final level of test design we indeed must REFERENCE SPECIFIC Elements of The Application. Thus, for test Automation, We need to make our application maps.

Naming The Compontation Has Formal Design Documentation That Explicitly Provides Meaningful Names for The Windows and Components, The Test Team Is Going to Have To Develop this Themselves.

The team will discuss and agree upon the names for each window and component. Sometimes we can use the names developers have already given the components in the code. But the team can often come up with more meaningful and identifiable names. Regardless, once defined, the names chosen should not change However, if the need arises, an item can always have more than one name.Test Design Application Map:. for low-level test design and manual testing, an Application Map suitable for human consumption should be created. ............. .י..............................

While many components may be exactly what they look like, this is not always the case. Many controls may simply be windowless, painted elements that the underlying environment knows nothing about. They can also be custom components or COM objects that are functionally different from the .

Automation Framework Application Map: For automated testing, an Application Map suitable for the automation framework will be created We will use the Test Design Application Map as our reference for the names used to identify the components The identification syntax suitable for the automation tool will.. THEN BE MAPPED TO Each Name As Discussed In Section 1.3.4.

Our test design so far has indirectly identified three documents or windows that we will interact with: (1) the Login page, (2) an Error dialog or message displayed during our failed Login attempts, and (3) the Home page of our web site displayed following a successful login attempt. We will also need to reference the browser window itself throughout these tests.We must now create an Application Map that will properly reference these items and their components for the automation framework. for the sake of simplicity, our .

Login Page

Figure 7

.................................. ...CRIPLIED facies, TOE.

Error Dialog

Figure 8

The Home Page of the application may contain many different elements. However, for the purpose of these tests and this example, we only need to identify the document itself. We will not interact with any of the components in the Home Page, so we will NOT Define the in this Sample Application Map.

Table 20 Shows The Application Map We Well Use to Identify The Browser Window and The Three Documents IN A Manner Suitable for the Automation Framework.

Site Application Map OBJECTNAME IDENTIFICATION METHOD Browser: Browser WindowID = WebBrowser LoginPage: LoginPage FrameID = content; /; DocumentTitle = Login UserID FrameID = content; /; DocumentTitle = Login; /; TextBoxIndex 1 Password FrameID = content =; /; DocumentTitle = Login ; /; TextBoxIndex = 2 SubmitButton frameID = content; /; DocumentTitle = Login; /; ButtonText = Submit CancelButton frameID = content; /; DocumentTitle = Login; /; ButtonText = Cancel ErrorWin: ErrorWin WindowCaption = Error ErrorMessage labelIndex = 1 OKButton ButtonText = OK HomePage: HomePage FrameId = Content; /; DocumentTitle = Home 20

The Physical Format of The Application Map Will Be determined by How The Automation Framework Will Access It. It May Be delimited Files, Database Tables, Spreadsheets, or any number of other Possibilities.

Notice that we have identified each document with its own section in the Application Map of Table 20. We do this to avoid naming conflicts among the many components of our application. For instance, there may be many forms that contain a Submit button. Each form CAN Name This Button The SubmitButton Because The names Only Have to Be Unique Wtem.

With this we have now uniquely identified our components for the framework. The OBJECTNAME is how we reference each component in our low-level Step Tables. The IDENTIFICATION METHOD is the information the automation tool needs to identify the component within the computer operating system environment.

The syntax for these component identifications is different depending upon the automation tool deployed. The example syntax we used is not for any particular automation tool, but is representative of what is needed for automation tools in general. The Application Map designer will need a thorough understanding of the automation tool's component identification syntax in order to create effective Application Maps.New Component types: As we examine the application and develop an Automation Framework Application Map we may find new component types not handled by existing Component Functions to deal with this, we. NEED TO EITHER IMPLEMENT A New Component Function Module for Each New Component Type, or Determine How Best The Can Be Handled by Existing Component Functions. this, of course, is a job for the Automation Technical Staff.

1.4.4 Low-Level Tests - STEPS TABLES

Now that the design of our application is known and our Application Map has been developed, we can get down to the step-by-step detail of our tests. We can still develop Step Tables without an Application Map. But without the map, we Cannot Automatically Execute The Tests.

Looking back at all the Suites that detailed our high-level VerifyAuthenticationFunction Cycle Table, we see they invoke six reusable, low-level Step Tables that we are now ready to implement. These are listed in Table 21.

Step Tables Invoked by Suites STEP TABLE TABLE PURPOSE LaunchSite Launch the web app for testing Login Login with a User ID and Password VerifyLoginError Verify an Error Dialog on Invalid Login ExitLogin Exit the Login Page via Cancel VerifyLoginSuccess Verify Home Page up after Successful Login ShutdownSite Logoff and Close the browser

Table 21

We develop these Step Tables using the component names defined in our Application Map and the keyword vocabulary defined by our Component Functions Where test designers find missing yet needed keywords, actions, or commands in our Component Functions;. The technical staff will need to expand the appropriate Component Function module, Driver Commands, Support Libraries, or find some other solution to provide the needed functionality if possible.Now we can provide the detailed test steps that make-up our six Step Tables.

Step Table: launchsite command / document arg / component action Expected results launchbrowser default.htm browser verifycaption "login"

Table 22

Step Table: Login & User & Password Document Component Action Input & User LoginPage Password InputText & Password LoginPage Submitbutton Click

Table 23

Step Table: Verify: Verify Action Expected Result Errorwin VerifyCaption "Error" Errorwin ErrorMessage VerifyText "The User ID OR Password Was Invalid." Errorwin Okbutton Click

Table 24

Step Table: ExitLogin Document Component Action LoginPage CancelButton Click

Table 25

Step Table: VerifyLoginsuccess Document Component Action Expected Result HomePage VerifyTitle "Home" Browser VerifyCAPTION "Welcome"

Table 26

Step Table: SHUTDOWNSITE Document Component action Input Data Browser SelectMenuItem File> EXIT

Table 27

As you can see, our high-level test VerifyAuthenticationFunction has been detailed down to a very sparse set of highly reusable test steps. Our test designs have taken a high-level test specification, given that some abstract scenarios to perform, and finally provided the step-by-step instructions to execute those scenarios. We did all of this without resorting to difficult scripting languages, or complex software development environments.It may seem simple enough, but that is because we have the underlying automation framework doing so much of the Work for us.

Now That We Have All of this Defined, What Does It actually do?

Remember, the automation framework is invoked with one or more high-level Cycle Tables. These tables call the test Suites that, in turn, call the Step Tables to perform the low-level test steps that drive the application.

We developed our own Cycle Table called VerifyAuthenticationFunction. This calls our own collection of Suites, and ultimately the Step Tables we just finished developing. If you look over all of these tables, you can see they form a relatively small set of reusable instructions that make Up this test. But the generate a large instruction set at time of execution.

The Following Section Will Actually Illustrate The Automated Execution Flow of The Test We Have Just IMplement.

Table 28

Execution Flow of VerifyAuthenticationFunction Test Cycle Table Suite Table Step Table DOCUMENT Or COMMAND COMPONENT Or COMMAND ARG ACTION INPUT DATA Or EXPECTED RESULTS VerifyAuthenticationFunction VerifyInvalidLogin LaunchSite LaunchBrowser Default.htm Browser VerifyCaption "Login" Login & user = BadUser & password = GoodPassword LoginPage UserID InputText & user LoginPage Password InputText & password LoginPage SubmitButton Click VerifyLoginError ErrorWin VerifyCaption "Error" ErrorWin ErrorMessage verifyText "The User ID or password was Invalid." ErrorWin OKButton Click Login & user = GoodUser & password = BadPassword LoginPage UserID InputText & user LoginPage password InputText & password LoginPage SubmitButton Click VerifyLoginError ErrorWin VerifyCaption "Error" Errorwin ErrorMessage VerifyText "T he User ID or Password was Invalid. "ErrorWin OKButton Click Login & user = BadUser & password = BadPassword LoginPage UserID InputText & user LoginPage Password InputText & password LoginPage SubmitButton Click VerifyLoginError ErrorWin VerifyCaption" Error "ErrorWin ErrorMessage VerifyText" The User ID or Password was Invalid. "ErrorWin Okbutton Click ExitLogin LoginPage CancelButton Click Verify PlanchBrowser Default.htm Browser VerifyCAption

Login "Login & user =" "& password =" "LoginPage UserID InputText & user LoginPage Password InputText & password LoginPage SubmitButton Click VerifyLoginError ErrorWin VerifyCaption" Error "ErrorWin ErrorMessage VerifyText" The User ID or Password was Invalid. "ErrorWin OKButton Click ExitLogin LoginPage CancelButton Click VerifyValidLogin LaunchSite LaunchBrowser Default.htm Browser VerifyCaption "Login" Login & user = GoodUser & password = GoodPassword LoginPage UserID InputText & user LoginPage password InputText & password LoginPage SubmitButton Click VerifyLoginSuccess HomePage VerifyTitle "Home" Browser VerifyCaption "Welcome" ShutdownSite SelectMenuItem File Browser> ExitTable 28

1.5 Summary

In ORDER TO Keep Up with Delivery IT IS Essential To Implement AN Effective, Reusable Test Automation Framework.

We can not expect the traditional capture / replay framework to fill this role for us. Past experience has shown that capture / replay tools alone will never provide the long-term automation successes that other more robust test automation strategies can.

A test strategy relying on data driven automation tool scripts is definitely the easiest and quickest to implement if you have and keep the technical staff to handle it. But it is the hardest of the data driven approaches to maintain and perpetuate and often leads to long- Term Failure.

The most effective test strategies allow us to develop our structured test designs in a format and vocabulary suitable for both manual and automated testing. This will enable testers to focus on effective test designs unencumbered by the technical details of the framework used to execute them, while technical automation experts implement and maintain a reusable automation framework independent of any application that will be tested by it.A keyword driven automation framework is probably the hardest and potentially most time-consuming data driven approach to implement initially. However, this investment is mostly a one-shot deal. Once in place, keyword driven automation is arguably the easiest of the data driven frameworks to maintain and perpetuate providing the greatest potential for long-term success. There are also a few commercially available products maturing that may be suitable for your Needs.

What We Really Want Is A Framework That Can Be Both Keyword Driven While Also Providing Enhanced Functionality For Data Driven Scripts. We Integrate There Two Approaches The Results Can Be Very Impressive!

The Essential Guiding Principles We Should Follow When Developing Our Overal Test Strategy (Or Evaluating The Test Strategy of a Tool We wish to consider):

The test design and the test framework are totally separate entities. The test framework should be application-independent. The test framework must be easy to expand, maintain, and perpetuate. The test strategy / design vocabulary should be framework independent. The test strategy / Design Should Isolate Testers from The Complexities of The Test Framework.

BIBLIOGRAPHY:

Kit, E. & Prince, S. "A Roadmap for Automating Software Testing" Tutorial presented at STAR'99East Conference, Orlando, Florida, May 10, 1999. Hayes, L. "Establishing an Automated Testing Framework" Tutorial presented at STAR ' 99EAST Conference, Orlando, Florida, May 11, 1999. Kit, E. "The Third Generation - Integrated Test Design and Automation" Guest Presentation At Star'99East Conference, Orlando, Florida, May 12, 1999. MOSLEY, D. & Posey, B. Just Enough Software Test Automation New Jersey: Prentice Hall PTR, 2002. Wust, G. "A Model for Successful Software Testing Automation" Paper presented 12, 1999. Dustin at STAR'99East Conference, Orlando, Florida, May, E. Automated Software Testing: Introduction, Management, and Performance New York:. Addison Wesley, 1999. Fewster & Graham Software Test Automation: Effective use of test execution tools New York: Addison Wesley, 1999. Dustin, E. "Automated Testing Lifecycle Methodology (atlm) "Paper Presented At Star East 2000 Confere NCE, Orlando, Florida, May 3, 2000. Kit, E. & BUWALDA, H. "Testing and Test Automation: Establishing Effective Architectures" Presentation At Star East 2000 Conference, Orlando, Florida, May 4, 2000. Sweney, M. "Automation Testing Using Visual Basic" Paper presented at STAR EAST 2000 Conference, Orlando, Florida, May 4, 2000. Buwalda, H. "Soap Opera Testing" Guest presentation at STAR EAST 2000 Conference, Orlando, Florida, May 5, 2000. Pollner, A. "Advanced Techniques in Test Automation" Paper Presented At Star East 2000 Conference, Orlando, Florida, May 5, 2000.

转载请注明原文地址:https://www.9cbs.com/read-101836.html

New Post(0)