In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Application example of ScriptAssure Technology
Let's take a look at some examples of how the IBM Rational tool takes advantage of the dependency and independence of scripts, or combines the two to solve some problems.
[@ more@]
Application example of ScriptAssure Technology
Let's take a look at some examples of how the IBM Rational tool can take advantage of the dependency and independence of scripts, or combine the two to solve some problems.
The example is simple: open a browser, load the search page for Google, and click the search button (no need to enter any search content). We will record and replay the script in the Chinese interface, analyze the results and the involvement of ScriptAssure technology in it, and see what happens when it is played back in the English interface, and what the specific reasons are.
Figure 5. Application interface under test (Chinese)
Create a new project in Rational Functional Tester and set the application under test-browser iexplore.exe-through the "configure" menu item, we can start it and record the action sequence of the script.
Figure 6. Configure the application under test (browser)
Figure 7. Start the application under test and start recording
Figure 8. Automated test projects and scripts
The recorded script is roughly as follows: it launches an IE browser, activates the address bar to enter the address, and then clicks the search button.
Listing 1. Automatic test script part
Public void testMain (Object [] args) {startApp ("iexplore"); / / HTML Browser browser_htmlBrowser (document_ (), DEFAULT_FLAGS) .click (atPoint (354 document_ 46)); browser_htmlBrowser (document_ (), DEFAULT_FLAGS) .inputKeys ("www.google.com (ENTER)"); / / Document: Google: http://www.google.com/ button_googlesubmit (). Click ();}
Let's play the script back and forth. By default, the test log opens by default as soon as the test execution is complete. If you have closed your browser, you can also find the test log under the ScriptAssureProject_logs node in the Functional Test Projects view. The frame on the left side of the log provides quick navigation of information. The right border provides all the details.
This playback test is fine and all passed without any failures or warnings (although we did not add any explicit test verification points).
Figure 9. The running result of automatic test script under Chinese interface
Next, we switch the preferred language of the browser to English first, and then we open the browser. After loading the Google home page, we can see that the word "Google search" becomes "Google Search".
Figure 10. Switch the preferred language in the browser options
Figure 11. Application Interface under Test
Now let's play back the script we just recorded and get the following result: the test with warning passed.
Figure 12. The running result of automatic test script in English interface
Scroll to the first warning, as shown in figure 13. The message indicates "Object Recognition is weak (above the warning threshold)". This is what happens when the components on the UI change. Move the focus of the object viewer provided by Rational Functional Tester to the button under test, which shows the details of the current properties (figure 14).
Figure 13. Recognizable attributes of the tested button in the English interface
By comparing figure 14 with figure 2, we can see that the value of the attribute ".value" has changed in different language interfaces. The value saved in the object graph is "Google search", while the candidate found by Rational Functional Tester in the actual operation is "Google Search". In view of the discrepancy of the recognition attribute of this weight 100 and the change of the URL attribute of the page, the final recognition score is 10800, which is greater than the pre-set warning threshold, so there is a warning in the result report.
If you are interested, you can set the last column in the advanced mode settings (figure 4) to "12000", execute the test script again, and you will get a fully passed test result without any warning.
Through the customization of ScriptAssure, you can tune the operation of the script and let it reply more strictly or loosely without changing the test logic (test script code), to adapt to different types of products, or the test requirements of the same product at different stages, which greatly reduces the maintenance cost of test assets and improves the test efficiency. For recording and playback mode, there is a good balance between reliability and maintainability.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.