TESTCOMPLETE 1.1 TestComplete 1.1.1 Introduction TestComplete is a comprehensive automated testing platform designed to streamline the software testing process for desktop, web, and mobi
Trang 1ey H UTEC H HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY
University of Technology
FINAL ASSIGNMENT REPORT
Major: INFORMATION TECHNOLOGY
Course code: CMP186
Course name: FTWARE TESTING AND ALITY A RANCE Lecturer’s name:
Student’s name:
1 Nguyễn Cao Long ID: 2011063433 Class: 20DTHQBI
2 Nguyễn Quốc Huy ID: 2080601122 Class: 20DTHQBI
Ho Chi Minh City
2024
Trang 22 Table of contents
9° 8 1.2.1 Installation of TestComplete - c2 11 2211122111211 1111122111811 112112 8 PP 5ô nDD 9 1.2.2.1 Creating your first proJeet In TestComplete - +5 527 s2 55-2 9 1.2.2.2 Creating first test on a Web Based ProJect - 2c c+2- 222 10 1.2.2.3 Recording a Test for the Web Application -.-. - c2 12
2.1 Selentum and Selenrum IÏE - - 2 2211222123151 1131 1113111131111 1 1111111111111 12 15
“2i 0n 15
Vu» ni 16 2.3 Selentum IIDE L2 1201120112011 1211151115111 1511 1111111115111 1111 H115 k kg hay 17 2.3.1 Definition of Selenrum TIDE c2 0221220111131 1111111 1111111111111 11x22 17 2.3.2 Install and run Selenium IÏDE - 5 22 2221222213121 111211111111111 1152 x+2 18 2.4 Application Ủnder Test Introduction 5 - c2 2212222111112 211 1111122111112 x12 20 2.5 Summary oŸfest ©aS@S Q20 0 02011120 1112011111 1111115111111 1 1111111 1k KH kg ra 22
Trang 3@i- ¡002 9 6® ) na 10
®i- ¡ion na 10
Create project na 12 Record proJ€cf Ì - - 2 1 20111101115 1111111 1112211101111 1112 1110111101110 11kg 12 N' v0) 13 Record proJect Ổ - L1 2.11101111021112 111011111112 1110111101112 1110111101110 111k 13 Record proJecf 4 - c1 2.11101111021111 1110111111112 1110111101112 1110111101112 11kg 13
Analyzing test 2.0.0 cccccccccccccccccseccseeetseesseeeseeeesseesceeesssessstesteteensiteeeessaeeeniees 14
Run Selenium IDE cccececcseeseceneenecensensseeseesseeeeneensessesenteeenteeees 18 Create test on Selenium Ì - c1 2212111211121 1151 121111111111 121 821 811 8 g1 rg 19 Create test on Selenium 2 12: 12112111211 121 1151111111111 11 111821 H1 HH rg 19 : Create test on SeÏeftum 3 2: 1221211211221 1125111111111 1 1171 811 HH ray 20 Record a prOJ€CI 2 0 0 20111 10111021111111 11122111 111101110 1110111101112 2111k c ky 20
Trang 4PROLOGUE Nowadays, information technology is developing rapidly, leading to network systems and software increasing both in quantity and on a large scale and in software quality But since then, many problems have arisen about unnecessary software failures, causing serious impacts on society, the economy, etc These errors can be caused by the software itself being damaged due to not being thoroughly censored before giving it to the end user or possibly due to someone intentionally sabotaging it to steal personal information These difficult and urgent problems have tended to expand in recent years From here we can easily see that although software development is becoming more and more complex, the quality issue is still a big question mark that needs careful consideration Therefore, the requirement is to have software testing work carefully to prevent potential errors or failures in the software that we haven't even noticed yet However, because software is getting larger and larger, with thousands of modules, possibly developed by a company with thousands of people, testing such large software will take a lot of effort and time if done manually , not to mention the testing quality will not be high and accurate According to many calculations, testing plays a very important role in the software development process Therefore, there is a need for automated software testing systems that allow us to perform tasks quickly and with the highest safety and accuracy possible And that is the reason why I decided to carry out the topic: "Testing a website selling technology and electronics"
Trang 5Chapter 1 TESTCOMPLETE 1.1 TestComplete
1.1.1 Introduction
TestComplete is a comprehensive automated testing platform designed to streamline the software testing process for desktop, web, and mobile applications Developed by SmartBear Software, TestComplete offers a wide range of features to facilitate efficient and thorough testing, ultimately helping organizations improve the quality and reliability of their software products
At its core, TestComplete provides a user-friendly interface that enables testers to create, manage, and execute automated tests without requiring extensive programming knowledge Test scripts can be created using various scripting languages such as JavaScript, Python, or VBScript, catering to the diverse skill sets of testing teams One of TestComplete's key strengths lies in its support for a multitude of platforms and technologies Whether it's testing applications built with popular frameworks like NET, Java, or modern web technologies such as HTMLS5 and Angular, TestComplete offers robust support for a wide array of environments Additionally, it provides cross-browser and cross-device testing capabilities, allowing testers to ensure consistent performance across different browsers and devices
TestComplete also facilitates collaboration among team members by offering features for version control integration, test management, and reporting Test results can be easily shared and
1.1.1.1 Main function
Test Automation: TestComplete allows testers to create, record, and playback automated tests for desktop, web, and mobile applications It supports multiple scripting languages such as JavaScript, Python, and VBScript, enabling testers to write test scripts according to their preferred language and skill level
Cross-Platform Testing: TestComplete supports testing across different platforms, including Windows, macOS, iOS, and Android It enables testers to ensure consistent behavior and functionality of applications across various operating systems and devices Cross-Browser Testing: TestComplete enables testers to validate the performance and compatibility of web applications across different web browsers such as Chrome, Firefox, Safari, and Internet Explorer This feature ensures that web applications deliver
a seamless experience to users regardless of the browser they use
Trang 66 Object Recognition and Identification: TestComplete uses advanced object recognition technology to identify and interact with application objects such as buttons, menus, and text fields during test execution This allows testers to create robust and reliable automated tests that can adapt to changes in the application's user interface
Test Management and Reporting: TestComplete provides features for test management, including organizing test suites, scheduling test runs, and tracking test results It also generates comprehensive test reports with detailed information about test execution, including pass/fail status, logs, screenshots, and performance metrics
Integration and Extensibility: TestComplete can be integrated with various development and testing tools, such as continuous integration servers, version control systems, and bug tracking tools It also supports plugins and extensions, allowing testers to extend its functionality and integrate with custom frameworks and libraries
Team Collaboration: TestComplete facilitates collaboration among team members by providing features for version control integration, shared test repositories, and collaborative test development It enables teams to work together efficiently and effectively to deliver high-quality software products
1.1.1.2 Main interface
Tools - provides commands that affect the recording process
Edit - provides standard edit commands
Save/Load Snapshots - provides commands that affect obtaining information about an object
Project Explorer - provides commands that affect the Project Explorer panel
Test Engine - provides commands that affect test recording and debugging
Source Control - provides commands that affect source control systems
Main Menu - provides TestComplete menus
Debug - provides commands that affect the debugging process
Issue Tracking - provides commands that affect issue-tracking templates
Standard - provides commands that affect the structure of the current project suite Workspace - provides commands that affect the Workspace panel
Test Management System (TMS) - provides commands that affect reporting to external test management systems (for instance, Zephyr Squad)
Trang 7[~ 5a & DC ea Gen =f [iss cả I5: Ạ [Ea] GE 7 ấ} - % Show Mobile Screen ~ | L | BA connectto Zephyr forse ~ | to server | For Jira
I
e Project Werkspace
TB Project Explorer | Edit |
®
function Main( se Tracki {
@ cresseronserteserg Loge let process = Run®oplication( js
Efficiency: TestComplete significantly reduces the time and effort required for testing
by automating repetitive and time-consuming manual testing tasks Automated tests can
be executed much faster than manual tests, allowing for quicker feedback on the quality
of the software
Improved Test Coverage: With TestComplete, testers can create comprehensive test suites that cover a wide range of scenarios and use cases This helps ensure thorough testing of the application's functionality, leading to higher confidence in the software's quality
Consistency: Automated tests execute the same steps and checks consistently every time they run, eliminating the risk of human error that can occur with manual testing This consistency leads to more reliable test results and helps uncover defects early in the development process
Cross-Platform and Cross-Browser Testing: TestComplete supports testing on various platforms and browsers, allowing testers to ensure that applications function correctly across different operating systems and web browsers This helps organizations deliver a consistent user experience to all their users
Object Recognition: TestComplete's advanced object recognition technology enables tests to interact with application objects accurately, even as the application's UI changes over time This robust object recognition ensures the reliability and maintainability of automated tests
Trang 8§ Integration and Extensibility: TestComplete can be integrated with other development and testing tools, such as continuous integration servers, version control systems, and bug tracking tools It also supports plugins and extensions, allowing testers to extend its functionality and integrate with custom frameworks and libraries
Cost Savings: By automating testing tasks with TestComplete, organizations can reduce the need for manual testing efforts, leading to cost savings in terms of time, resources, and manpower Additionally, automated tests can be run repeatedly without incurring additional costs, making them a cost-effective solution in the long term
Improved Collaboration: TestComplete provides features for test management and collaboration, allowing teams to organize test suites, track test results, and share test artifacts easily This fosters collaboration among team members and helps streamline the testing process
1.2 Demo
1.2.1 Installation of TestComplete
TestComplete can be downloaded from the official SmartBear web site
from: https://smartbear.com/product/testcomplete/free-trial/
After downloading, follow the steps to install TestComplete:
Sl: Double-click on the downloaded TestComplete setup package Installation of the software will start and license agreements will be displayed
32: Specify the path of the folder where you want to install the software
SmartBear TestComplete 12 - InstallShield Wizard — Choose Destination Location
elect tokder where setup wall install fle
Setup wil install SmartBear TestComplete 12 in the following fokder
Figure 2: Set up TestComplete
S3: Now, a welcome dialog is displayed asking to activate a license, we can start by clicking a 30-day trial license
Trang 99 594: After this process restarts the computer, we are finished the process of installing TestComplete
1.2.2 Demo
1.2.2.1 Creating your first project in TestComplete
Launch the application and you will see the start page
Follow these steps to create a new project:
S1: Go to the File menu
52: Click on the New option from the menu
S3: Click on the New Project option
Figure 3: Create project 1
S4: Alternately, you can use the shortcut key (shift + ctrl + N) to create a new project S5: A window will appear, give a name to the project
Figure 4: Create project 2
S6: Click on Finish
Trang 1010 S37: So, we have created our first project in TestComplete
1.2.2.2 Creating first test on a Web Based Project
SL: Select File | New | New Project as shown in the screenshot
> p rial Success Checklist Derbtop Testing No Saved Projects
Samples A Tutoriale Wed Testing
Sere Requet | ive Demo Whats New
tự
SUPPORT RESOURCES COMMUNITY SELF-GUIDED BECOME AN
ANSWERS HELP EXPERT SMARTBEAR ACADEMY
Community Documentation Traming
| Prapect Cxcsorer | Cade Baclorer
Figure 5: Create project 3
S2: Enter the name of the project; you can also alter the location if required
(Ôn Em Yew Tee Geteg oom Ty Bay
Figure 6: Create project 4
33: Click on Next button
S4: Initially, we are testing a web-based application, hence select “Functional testing
of web pages’, and click Next
Trang 11Figure 7: Create project 5 S5: Once we have selected our platform in the previous step, a project creation wizard will take us to the Test Visualizer page, where we can enable/disable the Test Visualizer functionality Click on Next
Figure 8: Create project 6
S6: Now we need to specify the scripting language for our project After selecting the scripting language, click on Finish
Trang 121.2.2.3 Recording a Test for the Web Application
SI: Click on Append to Test, as shown in the image below
Figure 10: Record project 1
Trang 1313 S2: A recording panel as shown in the image will be displayed, indicating that the recording of the test has started We are now all set to perform actions
Figure 11: Record project 2
53: Launch the browser, TestComplete identifies the browser with the special inbuilt test command
54: Navigate to this URL https://www.google.com
S5: Type any query in the Google search box, say software testing helps
S6: Click on Stop button as shown in the image
Figure 12: Record project 3
57: Once we have clicked on the stop button, TestComplete will display the keyword editor where all our recorded keywords are displayed
58: To playback, our recorded test cases simply click on the Run Test button as shown 1n the image
Figure 13: Record project 4
Analyzing test result
Figure 14: Analyzing test 1
Run a browser and launch the browser It detects the launched browser by inbuilt test functions and performs the test during playback
Trang 14This command is used to wait for the page to load; here we have opened Google homepage, so that means test execution is paused until Google home page has loaded completely
Figure 16: Analyzing test 3
The following command is used to set text in the Google search bar, we have used software testing as our keyword, and hence the following text is displayed
Figure 17: Analyzing test 4
In the Test Visualizer, screenshots were captured during test execution to enable the tester to differentiate between actual and expected screen output