1. Trang chủ
  2. » Giáo Dục - Đào Tạo

Study automation test and apply for system testing

133 5 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Study Automation Test And Apply For System Testing
Tác giả Đỗ Phạm Trúc Quỳnh, Cao Thị Thùy Linh
Người hướng dẫn Mr. Nguyễn Đức Khoan
Trường học Ho Chi Minh City University of Technology and Education
Chuyên ngành Information Technology
Thể loại Graduation project
Năm xuất bản 2022
Thành phố Ho Chi Minh City
Định dạng
Số trang 133
Dung lượng 11,33 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Cấu trúc

  • CHAPTER 1: INTRODUCTION (19)
    • 1.1 Problem space (19)
    • 1.2 Objective and scope (19)
    • 1.3 Study Approaches (19)
  • CHAPTER 2: BASE THEORIES (21)
    • 2.1 Software Testing (21)
      • 2.1.1 What is SDLC? (21)
      • 2.1.2 What is Software Testing? (22)
      • 2.1.3 Testing Process (23)
      • 2.1.4 Principles of Software Testing (23)
      • 2.1.5 Testing Level (24)
      • 2.1.6 Types of Testing techniques (25)
      • 2.1.7 Types of Software Testing techniques (27)
        • 2.1.7.1 Functional Testing (27)
        • 2.1.7.2 Non-functional Testing (28)
        • 2.1.7.3 Test case (28)
        • 2.1.7.4 Bug report [7] (29)
    • 2.2 Automation Testing (31)
      • 2.2.1 What is Automation Testing? (31)
        • 2.2.1.1 Goals (31)
        • 2.2.1.2 Objectives (31)
      • 2.2.2 Automation Testing process (31)
      • 2.2.3 Benefits of Automation Testing (32)
      • 2.2.4 Difference between Manual Testing and Automation Testing (33)
    • 2.3 Review about techniques (35)
      • 2.3.1 NodeJS and NPM (35)
        • 2.3.1.1 NodeJS (35)
      • 2.3.2 Java JDK (35)
        • 2.3.2.1 Android SDK (35)
        • 2.3.2.2 Maven (35)
        • 2.3.2.3 Gradle (36)
        • 2.3.2.4 POM (Page Object Model) Overview (36)
      • 2.3.3 Libraries and tools (37)
        • 2.3.3.1 Selenium (37)
        • 2.3.3.2 Appium (40)
        • 2.3.3.3 Rest Assured (43)
        • 2.3.3.4 Extent report (44)
        • 2.3.3.5 TestNG (46)
        • 2.3.3.6 LoadRunner tool (48)
        • 2.3.3.7 Jenkins (50)
  • CHAPTER 3: AUTOMATION TESTING EXECUTION PROCESS (52)
  • CHAPTER 4: APPLY AUTOMATION TESTING TO SYSTEM TESTING (59)
    • 4.1 Setup environment (59)
      • 4.1.1 Download and setup Java JDK 11 (59)
      • 4.1.2 Download and setup Maven (61)
      • 4.1.3 Download and setup Android SDK (63)
      • 4.1.4 Download and setup Gradle (65)
    • 4.2 Automation Testing on platform (67)
      • 4.2.1 Website (67)
        • 4.2.1.1 Overview about tested website (67)
        • 4.2.1.2 Build the Test Cases (67)
        • 4.2.1.3 Create maven project in IntelliJ (68)
        • 4.2.1.4 Apply Selenium to test website (70)
      • 4.2.2 Mobile (81)
        • 4.2.2.1 Overview about tested Mobile (81)
        • 4.2.2.2 Build the Test Cases (82)
        • 4.2.2.3 Apply Appium to test app (82)
      • 4.2.3 API (90)
      • 4.2.4 Performance (94)
        • 4.2.4.1 What is Performance Testing? (94)
        • 4.2.4.2 Download and install LoadRunner (94)
        • 4.2.4.3 Create script (97)
        • 4.2.4.4 Create scenario and run script (100)
        • 4.2.4.5 Report and analysis (104)
      • 4.2.5 Auto with Jenkins (107)
        • 4.2.5.1 Create Jenkins Pipeline (107)
        • 4.2.5.2 Website (109)
        • 4.2.5.3 Mobile (114)
        • 4.2.5.4 API (115)
        • 4.2.5.5 Sequence diagram of Jenkins (116)
  • CHAPTER 5 CONCLUSION (117)
    • 5.1 Results obtained (117)
    • 5.2 Advantages (117)
    • 5.3 Limitations (117)
    • 5.4 Development direction (117)
  • Appendix 1: Web Application Testcases (120)
  • Appendix 2: Mobile Application Testcases (128)

Nội dung

115 Trang 16 16 LIST OF TABLES Trang 17 17 LIST OF ABBREVIATIONS SDLC — Software Development Life Cycle SRS — Software Requirement Specification UAT — User Acceptance testing QA — Qu

INTRODUCTION

Problem space

The rapid advancement of information technology and software development tools has significantly simplified the software development process, making it less labor-intensive and more efficient Despite this, the complexity of software and constraints of time and budget often hinder the ability to guarantee error-free software products Even with rigorous and scientific software quality assurance activities, including testing, errors can still be present in every software product, potentially causing irreparable damage.

Traditional testing methods, such as manual testing, are no longer sufficient to thoroughly test software functions Test automation has emerged as a solution to efficiently test systems that require repetitive testing, significantly reducing costs Notably, automated testing can seamlessly perform non-functional testing, which is often challenging and labor-intensive with manual testing approaches.

That's why I chose the topic "Study automation test and apply for system testing" as our graduation dissertation.

The primary purpose of a graduate dissertation on software testing is to delve into the testing phase of the Software Development Life Cycle (SDLC) and explore various types of testing, with a focus on test automation, ultimately equipping students with a comprehensive understanding of this critical aspect of software development.

Objective and scope

Software testing theory study dissertation Besides, study some test types of automation testing.

Study Approaches

Study overview of software testing and test automation, learn software testing tools for system testing.

With such a goal, the main research contents and results of the project are presented in six chapters as follows:

Chapter 3: Automation testing execution process

Chapter 4: Apply automation testing to system testing

Chapter 5: Conclusion includes results obtained, advantages, disadvantages, and development directions

BASE THEORIES

Software Testing

SDLC stand for Software Development Life Cycle It includes [1]:

- Requirement and analysis: We collect requirements from customers to develop a product as their expectation and then, an analysis is done to create SRS document (Software Requirement Specification)

- Design: The requirement in the SRS document is used as an input and software architecture that is used for implementing system development is derived

- Implementation: All the components of the software are implemented when developers get the design document and it is translated into source code

- Verification (Testing): Basing on SRS to start testing, if we find any defects, it will be assigned to developers to fix

Following the successful completion of testing, the product is deployed in the User Acceptance Testing (UAT) environment, marking the initial stage of its release Upon satisfactory testing results and sign-off, the product is then released to customers, signifying the final stage of deployment.

- Maintenance: After the product is deployed on production environment, the maintenance is started If there is any issue, it will be fixed or improved by developers

Figure 1: The Software Development Life Cycle

Software testing is a crucial process that involves validating and verifying the components and behavior of a software under test By doing so, it provides users and sponsors with objective, independent information about the software's quality and potential risks of failure.

- Analyzing the requirements of product for correctness and completeness in various contexts such as security, usability, feasibility etc

- Reviewing the architecture and design of the product

- Working with the developer team to improve coding techniques, design patterns, and tests

- Executing a program or application to check the behavior of it

- Using monitoring and observability techniques to take part in production activities [2]

Testing process can include the following steps [3]:

Effective test planning is crucial for a successful testing process, involving a thorough review of the test basis, test conditions, test environment, and test cases, all of which are based on the Software Requirements Specification (SRS) document This planning phase also entails defining clear completion or exit criteria, which serve as a benchmark to determine when testing is complete, ensuring that all testing objectives are met and that the testing process is concluded efficiently.

- Analysis and Design: The major tasks:

+ Reviewing the test basis such as requirements, design specification, risk, architecture, etc

+ To identify test conditions + To design the test cases + To design the test environment set-up and identify the tools

- Implementation and Execution: It has the following major task:

+ Creating data and test cases by using techniques + Creating test suite from test cases that are used to test a software application

+ Running the failed test cases again to confirm a fix + Logging the result of test cases

+ Comparing actual result with expected result

- Evaluating exit criteria and Reporting: It is a process of defining when to stop testing and depends on scope, risk, functionality, cost

- Test Closure activities: This stage is done when software is ready to be released

There are seven principles in software testing [4]:

Testing reveals the presence of defects, but the absence of detected bugs doesn't necessarily guarantee the software's complete correctness, as undetected bugs may still exist.

Conducting exhaustive testing is often an unfeasible task, given the vast scope and complexity of modern software systems A more practical approach is to prioritize testing based on the importance and risk associated with each module By identifying the most critical components, testers can focus their efforts on verifying the functionality of high-priority areas, thereby optimizing the testing process and minimizing potential risks This strategic approach enables teams to allocate resources more efficiently and ensure that the most vulnerable parts of the system are thoroughly tested.

Early testing is crucial in the software development life cycle (SDLC) as it enables the detection of bugs and errors from the outset, allowing for timely intervention and cost-effective solutions By identifying and addressing issues early on, developers can save valuable time and resources that would be spent on rectifying problems further down the line Moreover, early testing helps to validate requirements, reducing the likelihood of costly rework and changes later in the development process.

The concept of defect clustering reveals that a limited number of modules typically harbor the majority of bugs, often serving as the main functions or core components of the system By identifying these high-risk areas, QA teams can efficiently pinpoint and prioritize testing efforts, streamlining the quality assurance process and minimizing potential issues.

The pesticide paradox highlights a significant challenge in software testing, where repeatedly running the same test cases yields diminishing returns, resulting in a low probability of discovering new bugs To overcome this issue, test cases require periodic review and editing to maintain their effectiveness, or new test cases must be added to the testing suite to uncover previously undetected bugs, thereby ensuring the software's quality and reliability.

- Testing is context dependent: We need to use different approaches, different methods, and different testing techniques, the type of test depends on the type of software/application/website

- Absence of errors fallacy: Testing is not only to find bugs but also to check if the software meets the right needs or not Therefore, having No errors or

In software testing, there are mainly four Levels of Testing:

+ Unit testing is the testing of individual software components (e.g., modules, programs, objects, classes, etc.) that are separately testable

+ It may include testing of functionality, testing of specific non-functional characteristics, such as resource behavior (e.g., memory leaks), robustness testing, and structural testing (structure-based techniques)

* Developers do this kind of testing

Integration testing tests interfaces between components, interactions to different parts of a system such as an operating system, file system, and hardware or interfaces between systems Include:

It is done after component testing It helps test the interactions between software components

It may be done after system testing It helps test the interactions between different systems

* Testers do this kind of testing

System testing means testing the entire system All modules/components are integrated to verify if the system is working as expected

Acceptance testing is a crucial phase in the software development lifecycle that formally evaluates user needs, requirements, and business processes to ensure the system aligns with predefined acceptance criteria By conducting this type of testing, users, customers, or authorized organizations can verify whether the system meets their expectations and make informed decisions about accepting or rejecting it.

+ This is often the responsibility of the customers or users of a system

+ The goal is to establish confidence so finding defects is not the main focus of acceptance tests

+ The customer/independent test team does this kind of testing

Depending on the requirements of the software, an appropriate testing technique will be applied Each applied testing technique will provide different features and benefits to better serve the purpose

While there are several types of testing techniques available, we will focus on Black Box Testing and White Box Testing

Black box testing is a software testing technique that evaluates the functionality of a software or application without knowledge of its internal components or structure This method is also referred to as spec-based testing, focusing on the application's external behavior and ensuring it meets the required specifications.

Black box testing is mainly used to find missing functions, initialization errors, performance errors, and errors while accessing external databases

The testing techniques of black-box testing include

+ Equivalence Partitioning – Equivalence partitioning - In equivalence partitioning, the input data of an application will be checked into equal partitions This technique ensures testing each partition at least once

+ Boundary Value Analysis – In boundary value analysis, a technique used in which the testing of an application is done using the boundary values

A cause-effect graph is a testing technique that visually represents the relationship between a program's inputs and outputs, as well as the factors that influence the results In this approach, the cause refers to the input of the program, while the effect is the resulting output By utilizing a graphical representation, testers can effectively analyze the correlation between inputs and outputs, identifying potential variables that impact the outcome This technique enables a comprehensive understanding of the program's behavior, allowing for more efficient and targeted testing.

+ Error Guessing – Error Guessing is a software testing technique based on the skills and experience of the tester to detect errors when tools fail to do

+ All-pairs Testing – In this approach, the software is tested using the combinatorial method to test all possible discrete combinations of related parameters

White box testing is a software testing technique that examines the internal programming structure of an application, also referred to as inner box testing, open box testing, structural testing, or transparent box testing Unlike black box testing, this method focuses on the internal workings of the application, making it an essential approach at the unit, integration, and system levels of the testing process.

The testing techniques of white-box testing include:

Control Flow Testing is a white box testing technique used to determine the execution order of a program's statements or instructions through a control structure This technique involves selecting a specific part of a large program to establish a test path, primarily utilized in unit testing The control structure is then used to develop a test case for the program, with test cases represented by the program's control graph.

Data flow testing is a comprehensive testing strategy that involves analyzing the control flow of a program to identify sequences of events related to data variables or objects This approach focuses on tracing the origin and usage of variable values, examining where variables take their values and where these values are utilized, to ensure data integrity and accuracy By selecting specific paths through the program's control flow, data flow testing helps to discover potential errors and inconsistencies, ultimately enhancing the overall quality and reliability of the software.

+ Branch testing: In this type of technique, all branches shall be tested by running them a sequence of tests

Statement coverage is a crucial white box testing technique that focuses on executing every statement in the source code at least once, ensuring comprehensive testing This metric calculates and measures the number of statements in the source code that have been executed, providing valuable insights into the effectiveness of the testing process.

Automation Testing

Automation testing is a software testing technique that compares actual results with expected outcomes by utilizing test scripts or automation tools This method enables the automation of repetitive and complex tasks that are challenging to perform manually, thereby increasing testing efficiency.

Goals and Objectives of Automation [9]:

- Create high quality software and achieve user satisfaction

- Shorten testing time and reduce human work

- Helps increase efficiency and quality while reducing costs

- Improved software quality with each iteration

- Understand the system under test

- Create tests that are easy to run, easy to maintain

- Test Automation Feasibility Analysis − Check automated applicability testing of the software

- Appropriate Tool Selection − Select the suitable tool depending on the technology of the software product

- Evaluate the suitable framework − Choose a suitable framework to build the script Everyone has its own meaning

- Build Proof of Concept − Build an end-to-end scenario to ensure the main function can be automated

- Develop Automation Framework − After POC, framework development is carried out It should be built after you selected the framework meticulously

- Develop Test Script, Execute, and Analyze − When the script is completed, it will be executed, result are logged

The major benefits of automation testing [11]:

- High App Quality and Performance

- CI/CD and DevOps Implementation

2.2.4 Difference between Manual Testing and Automation Testing

Table 1: Different between Manual Testing and Automation Testing [12]

Parameter Automation Testing Manual Testing

Definition Automation Testing uses automation tools

In manual testing, test cases are executed by a human tester

Processing time Automated testing is faster than manual

Manual testing spend more time than automation

Exploratory Testing Automation does not allow random testing

Exploratory testing is possible in Manual Testing Reliability

Automated testing is a reliable method, because it is performed by tools and scripts

Manual testing is not as accurate because of human mistake

If UI is changed Automated Test Scripts need to be updated to work as expected

Small changes wouldn’t thwart execution of a manual tester

Investment Investment is needed for testing tools

Investment is needed for human resources

Performance Tests like Load Testing, Stress Testing, Spike Testing, etc have to be tested by an automation tool compulsorily

Does not perform performance testing

Must knowledge about at least one programming language

No need for programming language

Automated Tests Testing has a lower risk of missed out on deadline

Manual Testing has a higher risk of missed out on deadline

Review about techniques

- In 2009, Ryan Dahl wrote Node.js Node.js is an open-source runtime environment to help execute JavaScript code [13]

Node.js boasts a remarkably fast processing speed, thanks to its non-blocking I/O model, which enables the simultaneous handling of multiple requests without the need for multithreading, thereby significantly enhancing overall system efficiency.

- NPM (Node Package Manager) is a tool to create and manage Javascript programming libraries for Node.js

- NPM consists of two main parts [14]:

 A CLI (command-line interface) tool to help publish and install packages

 An online repository that hosts JavaScript packages (npmjs.com)

The Java Development Kit (JDK) is the fundamental component of the Java ecosystem, serving as the backbone for developing, compiling, debugging, and executing Java applications As the core component, the JDK provides an extensive range of tools, executables, and binaries essential for creating and running Java programs.

The JDK includes JVM (Java Virtual Machine) and the JRE (Java Runtime

Environment) The JVM is used to execute Java programs The JRE initializes the

JVM Therefore, JDK can execute and run by JVM and JRE [15]

The Android SDK is a software development kit for the android platform developed by Google It includes a set of development tools These include a debugger, libraries, a handset emulator [16]

Maven is an open-source build tool developed by the Apache Group, enabling efficient project management by building, publishing, and deploying multiple projects simultaneously This powerful tool allows developers to construct and document the entire lifecycle framework of their projects, streamlining the development process.

Primarily for java programmers, but it can also be used to build and manage projects using C#, Ruby, Scala or other languages

Maven utilizes the Project Object Model (POM) to define project builds, dependencies, and modules, streamlining the development process By pre-defining targets for task declaration, compiler, packaging, and order of operations, Maven ensures a structured approach to project management, facilitating efficient and organized builds.

In a Maven project, a crucial file known as the pom file is generated, which serves as the core configuration file This file defines various tasks, including those executed during testing, building, and running phases Based on these definitions, Maven manipulates the project, making the pom file a vital component of the project's lifecycle.

Maven’s purpose is to provide developers with:

+ Create a standard for everyone working on the project to follow as to which libraries to use and the version of the library all such things are managed by Maven

For large-scale, complex systems reliant on multiple libraries, continuous release is crucial, but the process of packaging, managing, upgrading, and maintaining them can be time-consuming and labor-intensive This is where Maven comes in, offering a solution to streamline these tasks and optimize system management By leveraging Maven, developers can efficiently build, deploy, and maintain their systems, saving time and resources.

Gradle is a powerful tool that automates the process of building and managing libraries, optimizing compilation and packaging for more efficient software development By utilizing Gradle, developers can leverage several key advantages, including streamlined build processes and improved project management, ultimately leading to faster and more convenient software development.

- Improved compared to previous tools

- Integrating tools: From IDEs (Integrated Development Environment) to CIs

(Continuous Integration) or deployment tools

2.3.2.4 POM (Page Object Model) Overview

POM is a design pattern that models pages and sections within a page as a separate object Each component/page includes all the actions and properties of that component/page [19]

Advantages of the Page Object model:

Figure 3: POM vs Non-POM comparison Source: Guru99.com

Selenium is a free (open source) framework used for automated testing web applications across different browsers and platforms

It supports most browsers: Firefox, Google Chrome, Internet Explorer, Safari or Microsoft Edge

Supports various languages such as Java, PHP, JavaScript, Python, etc

It includes many tools and libraries such as selenium IDE, Selenium WebDriver, Selenium Grid

Selenium WebDriver is an open-source API that allows you to programmatically interact with the browser on the operating system Selenium WebDriver was created specifically for browser automation

Selenium IDE is a recording and playback automation tool It is an extension on Chrome and Firefox

Selenium Grid saves time by spreading its tests across multiple machines, including heavy virtual machines [20]

Selenium WebDriver is a web framework for executing cross-browser tests This tool is used to automatically test a web-based application to verify that it works as expected

It is possible to choose a programming language to create test scenarios on Selenium WebDriver

WebDriver architecture consists of four main components [21]:

Multiple libraries such as Ruby, Python, Java, etc are supported in Selenium

- JSON wire protocol over HTTP:

JSON, or JavaScript Object Notation, is an open standard that facilitates data exchange between clients and servers on the web, serving as a transport mechanism for transferring data As a key component of REST APIs, JSON enables the seamless exchange of information between HTTP servers, playing a vital role in modern web development.

Each browser will have a specific driver, and without revealing the internal logic of browser functionality, the browser driver interacts with the respective browser by establishing a secure connection

The following tasks are performed in the background when a test script is executed:

+ An HTTP request is generated and it is delivered to the browser driver for every Selenium Command

+ The HTTP request is received by the driver through an HTTP server + All the steps/instructions to be executed on the browser is decided by an HTTP server

+ The HTTP server then receives the execution status and in turn sends it back to the automation scripts

Multiple browsers like Chrome, Firefox, Safari, Internet Explorer, etc supported

- It is Open-Source tools and is easy to get started

- There are many choices of languages for writing test scripts

- Compared to other tools, selenium WebDriver execute test scripts faster

- Selenium doesn't generate reports by itself

- In case of issues there is no prompt vendor assistance because selenium is open source

- Automation testing for desktop applications not supported by Selenium

- No Built-in Reporting facility

Appium is an open-source tool designed to automate native, mobile web, and hybrid applications across various platforms, including iOS mobile, Android mobile, and Windows desktop Native applications are software programs specifically developed for use on a particular platform or device, while mobile web applications are web-based apps accessed through a mobile browser, allowing for seamless automation testing across different environments.

One of the key benefits of Appium is its cross-platform functionality, allowing users to reuse code across iOS, Android, and Windows test suites This means that tests can be written against multiple platforms, including iOS, Android, and Windows, using a single API, thereby streamlining the testing process and increasing efficiency.

Appium follows the Client-Server Architecture There are 3 components included in it [23]:

Appium Client is the automation scripted code

An automation script, written in a programming language such as PHP, Java, or Python, is a crucial component in testing mobile applications This script encompasses the configuration of both the mobile device and the application, laying the groundwork for a comprehensive testing process Furthermore, it includes the logic and code necessary to execute test cases, allowing for a thorough assessment of the application's functionality.

The Appium server, built on Node.js, plays a pivotal role in facilitating communication between the Appium client and the mobile device By receiving connection requests and commands in JSON format, the server executes these commands on the device, enabling seamless automation To utilize the Appium server, it must be installed on the machine and initiated prior to running the automation code, ensuring a smooth and efficient testing process.

Our server is a versatile solution, compatible with multiple platforms including iOS and Android, facilitating seamless interaction with mobile application terminals By creating a session, it enables efficient communication between client libraries and the respective platform, leveraging its Node.js programming language foundation As an HTTP server, it effectively reads HTTP requests from client libraries and forwards them to the appropriate platform, streamlining the process.

These are mostly real mobile devices or emulators Automation scripts are executed on the terminal by the Appium server based on commands from the client

The Appium app serves as a repository for configuration details and automation scripts for test cases, which are transmitted to the server in JSON format Leveraging the jar files integrated into the client, the automation script undergoes conversion to JSON format, facilitating seamless communication with the server.

Upon recognizing the command, the Appium server establishes a connection with the corresponding terminal, triggering the execution of test cases The terminal then responds to the request via HTTP, sending the results back to Appium, thus completing the test case execution cycle.

- Can perform the test on both iOS and Android

- Automation tests for iOS and Android can be written using the same API

- Any language can be used to write Appium tests

- On mobile devices no need to install any additional software to support Appium

Figure 6: The Workflow of Appium Architecture Source: medium.com

- Complicated in configuration and time consuming to set up Appium for iOS and Android

- Can only run one iOS device

- No automation support for old Android version (below 4.1)

AUTOMATION TESTING EXECUTION PROCESS

We choose testcase to login to the website use selenium as a sample

- Step 1: Build the Test Cases

Testcase for login is written as follows:

Figure 11: Testcase to check login function on the website

- Step 2: Create project to test o Create maven project in IntelliJ o Add the necessary libraries to the pom.xml file just created in the project

Example: Add the selenium library for java to the pom.xml file as shown in Figure 12

Figure 12: Selenium library in pom.xml file o Organize folders according to the POM structure

Figure 13: Organize folders according to the POM structure

- Step 3: Create testscript o Observe the website's login interface

Figure 14: Login interface of the website o Defines the locator of elements in the login interface

The developer can inspect the element on Chrome browser to get the UI locator (Figurer 15)

Figure 15: Inspect the element on Chrome browser to get the UI locator

Locator of the elements will appear in the login page (Figure 16)

Figure 16: Locator of the elements in the login page o Create functions to interact with the UI

To streamline the process of entering login credentials, two functions, setUsername and setPassword, can be created These functions can be designed to incorporate the scrollIntoView function, which takes an element's locator as a parameter and scrolls the view to the position where the specified element is visible on the screen Additionally, the sendKeys function can be integrated to facilitate the input of email and password.

Figure 17: Code to enter email and password in the login page

The function sendKeys with params is the locator of the element and the data to enter

The function initiates by employing Selenium's wait function to pause execution until the target element becomes visible on the interface Once the element is detected, the relevant information is logged into a report file for record-keeping purposes Subsequently, the element is located using its unique locator and the desired data is inputted using Selenium's sendKeys function, effectively simulating user interaction.

Figure 18: Code to enter data

To automate the login process, a custom function named `clickLogin` can be created to simulate a click on the login button This function will utilize the `clickElementWithJS` method, passing the locator of the login button element as a parameter, along with the descriptive name "Login button" for improved readability By encapsulating this functionality within the `clickLogin` function, you can easily integrate it into your automation workflow, enhancing the efficiency of your testing or automation tasks.

Figure 19: Code to click login button

The clickElementWithJs function plays a crucial role in automating interactions with web elements, utilizing parameters such as the element's locator and function name This function initiates by scrolling the view to the element's position based on the provided locator, followed by a wait for the element to become clickable, leveraging Selenium's wait functionality Subsequent actions include highlighting the element and capturing a screenshot, after which the highlight is removed Ultimately, the function returns recorded information and images, providing a comprehensive record of the interaction.

56 taken in the report file Finally, find and click the element according to the locator passed in.

Figure 20: Code to click element o Base code test before any tests are executed

TestNG's @BeforeSuite annotation is utilized to execute the beforeSuite function prior to running a test suite This function plays a crucial role in generating a report and instantiating a new pageManager to oversee existing pages If no existing pages are found, a new page is created and the checked page is returned, ensuring seamless test suite execution.

TestNG's @BeforeMethod annotation plays a crucial role in setting up the test environment by executing the setUp_Web function before running a test script This function is responsible for initializing the driver, launching an incognito tab, and resizing the browser window, which is achieved through the createInstanceDriver function in the DriverFactory class Additionally, it creates the parent ExtentTest and logs essential information to the report Ultimately, it navigates to the Home page and waits for it to load completely, ensuring a seamless testing experience.

Figure 21: Code to execute before execute testscript

To create a test script, utilize the @Test annotation from TestNG, ensuring it is executed after the @BeforeSuite and @BeforeMethod annotations Within the testLoginWithExistData function, generate a child ExtentTest under the parent ExtentTest, labeled "Open HomePage" The goToLoginPage function involves waiting for the Home page to load, followed by waiting for the login page button to become clickable before clicking it Subsequently, enter the email and password, then click the login button, and verify the result using the getMessageToast function.

“Đăng nhập thành công”, the assertionTrue is correct, meaning the test passed If message “Fail đăng nhập” returned, the assertTrue is false, which mean the test fails

Figure 22: Testscript to check login function with exist data

Figure 23: Code to go to login page

After running will create an HTML report base on the extent report library as follows: o Email and password is correct  Result: pass

Figure 24: Report with result pass o Email and password is incorrect  Result: fail

Figure 25: Report with result fail

APPLY AUTOMATION TESTING TO SYSTEM TESTING

Setup environment

4.1.1 Download and setup Java JDK 11

- Download on link: https://www.oracle.com/java/technologies/downloads/#java11- windows

- Choose the version base on your operating system

- Run the exe to install Java on your machine

+ Setting up the path for Windows: Assuming you have installed Java in C:\Program Files\java\jdk

+ Right-click on 'My Computer' and select 'Properties'

+ Click the 'Environment variables' button under the 'Advanced' tab

+ Now, alter the 'Path' variable so that it also contains the path to the Java executable

• Choose “Path” and click “Edit” on System variables

Figure 27: Click to Environment Variables

- Go to https://maven.apache.org/download.cgi to download Maven (with

- Add MAVEN_HOME variables to the Windows environment using system properties and point them to our Maven folder

Figure 32: MAVEN_HOME environment variable setting

- Update the PATH variable by appending the Maven bin folder —

%MAVEN_HOME%\bin so that we can run the Maven command everywhere

Figure 33: Image of environment variable

4.1.3 Download and setup Android SDK

- Download and setup Android Studio

- Click “SDK Manager” -> Android SDK

- Tick version you want download and install -> Setup location -> Apply -> Ok

Figure 36: Download and install Android SDK

- Go to https://gradle.org/releases/ to download Gradle -> Click “complete”

Figure 39: After unzip the Gradle file

- Under “System Variables” select Path, then click Edit Add an entry for Gradle’s path Click OK to save

Automation Testing on platform

The Mobile store website is our project, it was built by MERN stack Requirements of website:

+ Sign up + Login in + Payment with Paypal + Manage products + Manage orders

It can be accessed on Windows, Linux, etc

We will test Mobile store by Black-box Testing

Figure 40: GRADLE_HOME environment variable setting

Figure 41: Testcase when paying with Paypal on the website

4.2.1.3 Create maven project in IntelliJ

- Step 1: Open IntelliJ and select create new project

- Step 2: Select project Maven -> Select Next

- Step 3: Name the project and the place to store the project -> finish

Upon successful project creation, a pom.xml file is generated, containing all the information specified during the setup process This file plays a crucial role in managing project dependencies, making it easier to add libraries to the project, thereby streamlining the development process.

Figure 43: The first content of the pom.xml file

4.2.1.4 Apply Selenium to test website

- The details of the requirements that the test suite needs can be found in the following

Selenium-java 4.0.0 Selenium version for Java

Chrome Browser 102.0.5005.115 Chrome browser to generate an instance Chrome Driver 102.0.5005.61 Driver to automate and control the browser

By implementing the Page Object Model (POM) structure in a project, a clear separation of concerns is achieved, distinguishing between the common background elements shared by the page and test, the page-specific components, and the code dedicated to handling individual test cases.

+ Create a folder named based containing page and test + Create a folder named pages containing the part handling each page + Create a folder named tests containing testcase handling code

+ In addition, create a folder named utils containing support classes during use

Figure 44: The structure of the project according to the POM structure

- Create an extentreports folder in the utils folder then create two more files in that directory

• Used to create a folder with the name ‘TestResults’ on that project and has the same level as the src folder

Figure 45: Code to create a folder with the name 'TestResults'

• Create the output path to the file of the report located in the TestResults folder

Figure 46: Code to create HTML report

• Used to create parent ExtentTests, child ExtentTests and List include those ExtentTests in the report

Figure 47: Code to create content in the report

• Used to create status, details, image for parent ExtentTest and child ExtentTest

Figure 48: Code of LogInformation method

Figure 49: Code of logPass method

Figure 50: Code of logFail method

• Used to get the displayed message

Figure 51: Code of BasePage class

 Use TestNG Annotations to serve the purpose: pre-and post-processing of test case

• Create environment before test execution

Figure 52: Create environment before test execution

• Clear states after test execution

Figure 53: Clear states after test execution

- WebActions (Located in the folder utils): Contains methods for creating web interactions For example, the action of entering text or clicking an element (can highlight and take screenshots)

Figure 54: Code to enter text in WebActions class

Figure 55: Code to click element, highlight and screenshot in WebActions class

- PaymentPage (Located in the folder pages): This page contains Locators and processes on the Payment page

77 Figure 56: Code in PaymentPage class

The PaymentByPaypal test case, located in the tests folder, executes a comprehensive test scenario that meticulously handles the steps involved in paying with Paypal By inheriting the BaseTestWeb class, this test case effectively initializes the browser and Extent Report, while also ensuring a thorough cleanup of states after the test is completed.

+ Declare a variable and use Annotation @BeforeTest for the setup method so that the setup method runs before the confirmPayment method with Annotation of @Test

Figure 57: Code to declare and setup in PaymentByPaypal class + Next is the test code to pay by Paypal

To successfully complete the payment step, it is essential to initiate the process by logging in with the correct credentials, utilizing the LoginWithCorrectData method Additionally, users must have products in their cart, which can be achieved by navigating to the product page via the goToProductPage method and subsequently adding desired items to the cart using the AddToCart method Ultimately, the goToCartPage method in the test code seamlessly integrates these steps, facilitating a smooth execution of the payment process.

Figure 58: Code to test login with correct data

Figure 59: Code to test go to Product Page functionality

Figure 60: Code to test add product functionality

Figure 61: Code to test go to Cart Page functionality

Figure 62: Code to run testcase

To generate an informative report, create an ExtentTest named 'Order' to store step-by-step execution details This ExtentTest enables users to review the report in ExtentReport, providing in-depth information on each element interaction, including the status and name of the clicked element.

To track step-by-step execution details, create an instance of ExtentTest, naming it "Login to Paypal" within ExtentReport This test will record detailed information, including the specific elements where text is set, the elements clicked, and their corresponding statuses and names By doing so, you can effectively monitor and log the entire login process to Paypal This approach enables comprehensive reporting and easy identification of any issues that may arise during the login process.

In addition to generating reports, ExtentTest can also be utilized to record step-by-step execution information, providing a detailed account of the test process By creating an instance of ExtentTest with the name "Check information and confirm to order", users can track the status and name of each element clicked, with the results compiled into a comprehensive report within ExtentReport.

• Finally, wait for the web to load and check if this test case passes or fails.Write Test Script base on the test case

- Run testscript PaymentByPaypal receive report:

Figure 63: HTML report received after running

To create additional test scripts, follow a similar approach to the test script for the PayPal payment function, allowing for the execution of all web test scripts via a TestNG XML config file By creating a TestSuites folder at the same level as the src folder, you can organize your tests more efficiently Within this folder, create a Flow1.xml file, which serves as a configuration file to help structure your tests, enabling seamless execution of test scripts.

- Run flow1.xml receive report

The Mobile store app is our project It is built by Flutter as a frontend and runs on the website's server Requirements of app:

+ Sign up + Log in + Update profile

+ Change password + Payment with Paypal + Payment with COD

We will test Mobile store by Black-box Testing

Figure 65: Testcase tests payment of app

4.2.2.3 Apply Appium to test app

- Create a AppiumDriverInstance file which contains methods

+ GetCurrentUdId: to get the udid to create the Desired Capabilities connection Desired Capabilities are used to connect Server and Client

Figure 66: Code to start Server Appium

Figure 68: Code to close Server Appium

+ Use TestNG Annotations to serve the purpose: pre-and post-processing of test case

Figure 67: Code to open app in devices

• Create environment before test execution

Figure 69: Create environment before test execution

• Clear states after test execution

Figure 70: Code to clear states after test execution

- MobileActions (Located in the folder utils): For example, the action of entering text or clicking an element

Figure 71: Code to enter text

Figure 72: “Click by Coordinator” Action

- OrderPageAndroid (Located in the folder pages):

86 Figure 73: Code to determine the position of element

87 Figure 74: Code to perform interactive operations with the app

The Payment_Android test case, located in the tests folder, simulates the steps involved in making a payment using the Cash on Delivery (COD) method By inheriting the BaseTestMobile class, this test case enables the Appium Server and launches the app on a mobile device, ensuring a seamless testing experience.

To initiate the payment process, users must first log in using the testLoginApp method, ensuring they have previously added products to their cart by navigating to the product page via testGoToDetailProduct, adding items with testClickAddToCart, and proceeding to the cart page through testGoToCart to checkout with testCheckOut The testEnterInformation method will subsequently execute these steps to complete the transaction.

Figure 75: Code to test the login function of the app

Figure 76: Code to test the app's product detail view functionality

Figure 77: Code to test the add product to cart functionality of the app

Figure 78: Code to test the app's shopping cart functionality

Figure 79: Code to test the app's billing functionality

Figure 80: Code to test the app's billing input functionality

Figure 81: Code to start running payment by COD

To effectively track and document the execution process of the "Payment By COD" test case, create an instance of ExtentTest and integrate it with ExtentReport, allowing for the capture and storage of step-by-step execution details, including the specific elements interacted with, their corresponding status, and names, thereby providing a comprehensive record of the test case's progress.

+ Finally, wait for the web to load and check if this test case passes or fails

- The results are also exported to the report file of extent reports

To create additional test scripts, follow a similar approach to the COD payment function test script, allowing you to run all web test scripts using a TestNG XML config file Organize your tests by creating a 'TestSuites' folder at the same level as the 'src' folder, then add a 'Flow2.xml' file within it, which serves as a configuration file to structure your tests.

- Run flow2.xml receive report

- Use Rest-Assured to test API Add to pom.xml

Figure 82: Add Rest-Assured library to the project

- Use library json-path to read json in response Add to pom.xml

Figure 83: Add json-path library to the project

- Create ReadJsonUtil class in utils folder to read data in generated file by basePath (Figure 89)

Figure 84: Code to read Json

- We also apply the POM structure to separate the sections including

The project structure is organized into distinct directories, including 'base' and 'tests', where BaseTestAPI and TestApis are located respectively Notably, the test API section is excluded from the UI, prompting the placement of API interaction within the 'pages' folder for streamlined organization and accessibility.

- BaseTestAPI: create the handle before and after running testcase by use annotation

- In folder pages: create a folder api contain file ApiAutho and ApiBase

+ ApiBase: extent RestApiHelper (This file manages interactions with response) to use methods interaction with the response

+ ApiAutho: extent ApiBase, use inherited methods to create methods to interaction with API

Figure 85: Code in ApiAutho class

93 Figure 86: Code in ApiBase class

- The results are also exported to the report file of extent reports

Figure 87: HTML report received after running

Performance testing is a process of testing to determine the performance of a software product

- Some types of performance testing:

A performance test is crucial in determining or validating an application's speed, scalability, and stability This encompasses load testing, which verifies how an application behaves under both normal and peak load conditions, ensuring seamless functionality even when demand surges Furthermore, stress testing is essential in evaluating an application's behavior when pushed beyond its normal or peak load conditions, thereby identifying its breaking point and potential areas for optimization.

- Go to https://my.microfocus.com/signup and Sign Up

- Check your email to confirm

- Go to Login Page https://login.microfocus.com/nidp/app/login?id&sid=0&option=credenti al&sid=0

Figure 88: The screen of create a Micro Focus Account

Figure 89: Email sent from Micro Focus for confirmation

- Enter your username and password to Login

- And go to https://sld.microfocus.com/mysoftware/entitlement?eon=TO- 48297&disagree=true&accepttsse&nopermissionse to check product

- Select “Download” to choose and download LoadRunner

Figure 90: Micro Focus login screen

Figure 91: Screen to check product

- Run exe file to Install LoadRunner

- Open “Virtual User Generator” to create Script

- Choose File -> Add -> New Script

- Choose “Web-HTTP/HTML” and enter Script Name -> Create

98 Figure 94: Setup to create new script

- Click “Record” button -> Set name of action, URL, directory and click “Start Recording”

Figure 96: Record to create script

- With every step, you will create an action

- You click “Stop recording” to end

4.2.4.4 Create scenario and run script

- Open “Controller” to create scenario and run test script

- “Add Group” -> Choose script -> Set Vuser -> Ok

Figure 99: Choose the scripts and the number of people to do it

- Set Global Schedule you want to run script

- Choose Run -> Tick Windows resources to setup something

- Click “Add” and enter Name

- Click Add below “Resource Measurements” and Add something -> Ok

Figure 103: Add the parts that need to get parameters

- Start scenario and wait for it

- Open “Analys” and choose lrr file

+ Transaction Summary Report: shows details info of each transaction

Base on expectation, determine if the response times are acceptable or not

+ Average Transaction Response Time: shows the average response time of each transaction at a specific time This shows an instability in the performance server

Figure 108: Average Transaction Response Time

+ Running Vusers: investigate heavy load (multi concurrent Vusers) There were 33 Vusers ran simultaneously

+ Hits per Second: refers to the number of HTTP requests sent by the user(s) to the Web server in a second

- Throughput graph provides information about the amount of data (in Bytes or MB) that a Vuser received from the server at any given time

Base on above informations, you will know your system’s performance

- At the dashboard interface select New Item

- Enter a name, select pipeline and click OK

- Config Pipeline script with Pipeline syntax: The script below executes run BE, FE, and Flow01.xml (including website testscripts) of the project

110 Figure 115: Create enviroment variables of Jenkins

111 Figure 116: Create enviroment to run project

112 Figure 117: Build BE, FE and execute test scripts

Figure 118: Generate HTML report file

- Run Jenkins: Click Build Now to run Jenkins pipeline

- Config Pipeline script with Pipeline syntax: The script below executes run Flow03.xml (including mobile testscripts) of the project

To streamline the process, we can leverage the existing environment variables established in the website section and build code section, which generates an HTML report file By doing so, we can focus on rewriting the test scripts execution part and clearing the code sections for both Frontend (FE) and Backend (BE), thereby optimizing the overall workflow.

- Config Pipeline script with Pipeline syntax: The script below executes run BE, FE, and Flow02.xml (including mobile testscripts) of the project

CONCLUSION

Results obtained

After working on this project for a while, I have achieved the following results:

- Learn about a very important and indispensable phase in the process of software development, that is testing Especially go deeper in automation testing.

- Know the tools used in automation testing like Selenium, Appium, and LoadRunner, and how to install, and use them for testing in practice.

Advantages

- Master the background knowledge to be able to apply to other test projects and know how to expand.

- Know how to perform automation testing.

Limitations

- Haven't done auto-generating testcases for any website yet.

Development direction

- Write software to automatically generate testcases for any website

- Apply tools for testing on other platforms or look for another tool for testing

[1] “softwaretestinghelp,” [Trực tuyến] Available: https://www.softwaretestinghelp.com/

[2] “SoftwareTtesting - wiki,” [Trực tuyến] Available: https://en.wikipedia.org/wiki/Software_testing

[3] “Testing Process - toolsqa,” [Trực tuyến] Available: https://www.toolsqa.com/software- testing/test-process-in-software-testing/

[4] “Seven principles - guru99,” [Trực tuyến] Available: https://www.guru99.com/software- testing-seven-principles.html

[5] “Types of Testing techniques - elprocus,” [Trực tuyến] Available: https://www.elprocus.com/what-are-testing-techniques-types-advantages-disadvantages/

[6] “TestCase - guru99,” [Trực tuyến] Available: https://www.guru99.com/test-case.html

[7] “softwaretestinghelp,” [Trực tuyến] Available: https://www.softwaretestinghelp.com/

[8] “Automation Tesing,” [Trực tuyến] Available: https://www.softwaretestinghelp.com/automation-testing-tutorial-1/

[9] “Goals and Objectives of Automation Testing,” [Trực tuyến] Available: https://www.qamadness.com/automated-testing-goals-objectives/

[10] “Automation Testing process,” [Trực tuyến] Available: https://www.tutorialspoint.com/qtp/qtp_test_automation_process.htm

[11] “Benefits of Automation Testing,” [Trực tuyến] Available: https://smartbear.com/blog/7- benefits-of-implementing-automated-testing/

[12] “Manual&Automation - guru99,” [Trực tuyến] Available: https://www.guru99.com/difference-automated-vs-manual-testing.html

[13] “NodeJs,” [Trực tuyến] Available: https://en.wikipedia.org/wiki/Node.js

[14] “npm,” [Trực tuyến] Available: https://www.freecodecamp.org/news/what-is-npm-a- node-package-manager-tutorial-for-beginners/

[15] “Java JDK - infoworld,” [Trực tuyến] Available: https://www.infoworld.com/article/3296360/what-is-the-jdk-introduction-to-the-java- development-kit.html

[16] “Android SDK,” [Trực tuyến] Available: https://en.wikipedia.org/wiki/Android_SDK

[17] “Maven -simplilearn,” [Trực tuyến] Available: https://topdev.vn/blog/maven-apache/

[18] “Gradle,” [Trực tuyến] Available: https://docs.gradle.org/current/userguide/what_is_gradle.html

[19] “Page object model,” [Trực tuyến] Available: https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/

[20] “Selenium,” [Trực tuyến] Available: https://testguild.com/selenium-4/

[21] “Selenium Webdriver - browserstack,” [Trực tuyến] Available: https://www.browserstack.com/guide/selenium-webdriver-tutorial

[22] “Appium - intro,” [Trực tuyến] Available: https://appium.io/docs/en/about-appium/intro/

[23] “Architecture appium - softwaretestinghelp,” [Trực tuyến] Available: https://www.softwaretestinghelp.com/what-is-appium/

[24] “Rest Assured - tutorialspoint,” [Trực tuyến] Available: https://www.tutorialspoint.com/what-is-rest-assured

[25] “ExtentReport - browserstack,” [Trực tuyến] Available: https://www.browserstack.com/guide/extent-reports-in-selenium

[26] “TestNG - tutorialspoint,” [Trực tuyến] Available: https://www.tutorialspoint.com/testng/testng_overview.htm

[27] “LoadRunner - perfmatrix,” [Trực tuyến] Available: https://www.perfmatrix.com/loadrunner-introduction

[28] “Jenkins,” [Trực tuyến] Available: https://www.jenkins.io/

Web Application Testcases

11 Enter the OTP code received from the registered email

Notice of the account has been activated and redirected to the login page

Enter Password Information has been entered As Expected Pass

Click button REGISTER Notice of successful registration

Enter the OTP code sent to your email to activate your account

Enter Email Information has been entered As Expected Pass

Enter Mobile phone Information has been entered As Expected Pass

Select War Information has been selected As Expected Pass

Actual Results Pass / Fail / Not executed / Suspended

Navigate to the page https://localhost:3000/register Accessible As Expected Pass

Select District Information has been selected As Expected Pass

Enter Address Information has been entered

Test Case (Pass/Fail/Not Pass

Select Province Information has been selected As Expected Pass

Enter Fullname Information has been entered As Expected Pass

Tỉnh = Lâm Đồng Quận/Huyện = Thành phố Bảo Lộc Phường = Phường 2

Email = quynhdothy@gmail.com Mobilephone = 0393304218 Password = Quynhquynh280200 Sign Up Success

Step # Step Details Expected Results

Access to Chrome browser Fullname = Đỗ Phạm Trúc Quỳnh

Test Case ID Test Case Description

Created By Reviewed By Quỳnh

- Check registration function with registered email

MS_02 Check registration function with registered email

Email notifications already in use Registration failed

Enter Password Information has been entered As Expected Pass

Click button REGISTER Email notifications already in use Registration failed As Expected Pass

Enter Email Information has been entered As Expected Pass

Enter Mobile phone Information has been entered As Expected Pass

Select District Information has been selected As Expected Pass

Select War Information has been selected As Expected Pass

Enter Address Information has been entered As Expected Pass

Select Province Information has been selected As Expected Pass

Navigate to the page https://localhost:3000/register

Enter Fullname Information has been entered As Expected Pass

Step # Step Details Expected Results Actual Results Pass / Fail / Not executed / Suspended

Access to Chrome browser Fullname = Đỗ Phạm Trúc Quỳnh

Address = 58/1 Tây Sơn Tỉnh = Lâm Đồng Quận/Huyện = Thành phố Bảo Lộc Phường = Phường 2

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Test Case ID Test Case Description

Created By Reviewed By Quỳnh

Enter Password Information has been entered As Expected Pass

Click button LOGIN Show successful login message As Expected Pass

Navigate to the page Accessible As Expected Pass

Step # Step Details Expected Results Actual Results

Enter Email Information has been entered As Expected

Pass / Fail / Not executed / Suspended

Access to Chrome browser Email = quynhdothy@gmail.com

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Test Case ID Test Case Description

Created By Reviewed By Quỳnh

- Check login function with empty password

- Test the user's ordering function

MS_04 Check login function with empty password

3 Click button LOGIN Show message error As Expected Pass

Navigate to the page Accessible As Expected Pass

Enter Email Information has been entered As Expected Pass

Step # Step Details Expected Results Actual Results Pass / Fail / Not executed / Suspended

Access to Chrome browser Email = quynhdothy@gmail.com

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Test Case ID Test Case Description

Created By Reviewed By Quỳnh

MS_05 Test the user's ordering function

15 Click button "Xác nhận đơn hàng"

Notice of successful order creation and redirect to Home

Click next Switch to Confirm Step As Expected Pass

Click next Switch to Complete Step As Expected Pass

Select "thời gian giao hàng" Information has been selected As Expected Pass

Select "Phương thức thanh toán" Information has been selected As Expected Pass

Select "Quận/Huyện" Information has been selected As Expected Pass

Select "Phường/Xã" Information has been selected As Expected Pass

Enter "địa chỉ nhận hàng" Information has been entered As Expected Pass

Select "Tỉnh" Information has been selected As Expected Pass

Login with user account Show successful login message and redirect to the home page As Expected Pass

Click "Cart" icon Show the list of products that As Expected Pass

Select "hình thức nhận hàng" Information has been selected As Expected Pass

Click button "Đặt hàng ngay" Redirect to Payment page with As Expected Pass

Enter "Số điện thoại" Information has been entered As Expected Pass

Enter "Email" Information has been entered As Expected Pass

Thời gian giao hàng = Các ngày trong tuần Ghi chú =""

Step # Step Details Expected Results Actual Results Pass / Fail / Not executed / Suspended

Phương thức thanh toán = Thanh toán ngay khi nhận hàng Tỉnh = Lâm Đồng, Quận/Huyện = Thành phố Bảo Lộc, Phường/Xã = Phường 2

Access to to the page https://localhost:3000/login Họ tên người nhận = Quỳnh

18110189@student.hcmute.edu.and Pass:

There is a list of products in the cart Email: 18110189@student.hcmute.edu

Hình thức nhận hàng = Tại nhà Địa chỉ nhận hàng = 58/1 Tây Sơn

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Test Case ID Test Case Description

Created By Reviewed By Quỳnh

- Test admin's add model function

MS_06 Test admin's add model function

Click button "Save" Show a message of successful As Expected Pass

Select "Hình ảnh" Information has been selected As Expected Pass

Click button "Submit" Notice of successful added model As Expected Pass

Click button: Thêm màu" Show form to enter "Màu" and As Expected Pass

Enter "Màu" Information has been entered As Expected Pass

Enter "Sim" Information has been entered As Expected Pass

Enter "Chip" Information has been entered As Expected Pass

Enter "Sạc" Information has been entered As Expected Pass

Camera sau = Chính 108 MP & Phụ 13 MP, 5 MP Thẻ nhớ = Không hỗ trợ

Pin = 4600 mAh Sạc = 55W Sim = 2 Nano SIM Màu = xanh dương

Enter "Thẻ nhớ" Information has been entered As Expected Pass

Enter "Pin" Information has been entered As Expected Pass

Enter "Camera trước" Information has been entered As Expected Pass

Enter " Camera sau" Information has been entered As Expected Pass

Chọn "Trạng thái" Information has been selected As Expected Pass

Enter "Hệ điều hành Information has been entered As Expected Pass

Enter "Mô tả" Information has been entered As Expected Pass

Enter "Thời gian ra mắt" Information has been entered As Expected Pass

Enter "Màn hình" Information has been entered As Expected Pass

Select "Thương hiệu" Information has been selected As Expected Pass

Click button "Add model" Show form to enter information of new model As Expected Pass

Enter "Tên mẫu" Information has been entered As Expected Pass

Login with admin account Show successful login message and redirect to the home page of admin

Click "Model" icon Show the list of model and add model button As Expected Pass

Hệ điều hành = Android Camera trước = 20MP

Step # Step Details Expected Results Actual Results Pass / Fail / Not executed / Suspended

Mô tả = Có thể thấy, điểm sáng trong thiết kế của Mi 11 đến từ cụm 3 camera mặt sau Thời gian ra mắt = 2021

Access to to the page https://localhost:3000/login Tên mẫu = Xiaomi Mi 11 5G

Login as admin Email: quynhdothy@gmail.com.and Pass: 123456aA Màn hình = AMOLED6.81"Quad HD+ (2K+)

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Test Case ID Test Case Description

Created By Reviewed By Quỳnh Version

- Test the function of deleting products in the cart

MS_07 Test the function of deleting products in the cart

Login with user account Show successful login message and redirect to the home page As Expected Pass

Click "Cart" icon Show the list of products that have been added to the cart and summary of order

Step # Step Details Expected Results Actual Results

Click Remove Notice of product removal from the cart is successful and the product is removed from the cart

Pass / Fail / Not executed / Suspended

Already have Iphone 11 64GB 4GB 256GB

Access to to the page https://localhost:3000/login

18110189@student.hcmute.edu.and Pass:

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Test Case ID Test Case Description

Created By Reviewed By Quỳnh

- Test the payment function with Paypal

MS_08 Test the payment function with Paypal

Test Case ID Test Case Description

Created By Reviewed By Quỳnh Version

Access to to the page https://localhost:3000/login Họ tên người nhận = Quỳnh

18110189@student.hcmute.edu.and Pass:

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Step # Step Details Expected Results Actual Results Pass / Fail / Not executed / Suspended

There is a list of products in the cart Email: 18110189@student.hcmute.edu

Hình thức nhận hàng = Tại nhà Địa chỉ nhận hàng = 58/1 Tây Sơn Tỉnh = Lâm Đồng, Quận/Huyện = Thành phố Bảo Lộc, Phường/Xã = Phường 2

Login with user account Show successful login message and redirect to the home page As Expected Pass

Click "Cart" icon Show the list of products that As Expected Pass

Thời gian giao hàng = Các ngày trong tuần Phương thức thanh toán = Paypal

Enter "Email" Information has been entered As Expected Pass

Select "hình thức nhận hàng" Information has been selected As Expected Pass

Click button "Đặt hàng ngay" Redirect to Payment page with As Expected Pass

Enter "Số điện thoại" Information has been entered As Expected Pass

Select "Phường/Xã" Information has been selected As Expected Pass

Enter "địa chỉ nhận hàng" Information has been entered As Expected Pass

Select "Tỉnh" Information has been selected As Expected Pass

Click button "Xác nhận đơn hàng" Notice of successful order creation and redirect to Paypal As Expected Pass

Email_paypal = duc@gmail.com Ghi chú =""

Click next Switch to Confirm Step As Expected Pass

Click next Switch to Complete Step As Expected Pass

Select "thời gian giao hàng" Information has been selected As Expected Pass

Select "Phương thức thanh toán" Information has been selected As Expected Pass

Select "Quận/Huyện" Information has been selected

Click button Login Redirect to Paypal payment page As Expected Pass

Click button Submit Redirect to Home page As Expected Pass

Enter "Email_paypal" Information has been entered As Expected Pass

Enter "Password_paypal" Information has been entered As Expected Pass

- Test the payment function by COD

MS_09 Test the payment function by COD

Click next Switch to Complete Step As Expected Pass

Click button "Xác nhận đơn hàng" Notice of successful order creation and redirect to Cart Page As Expected Pass

Select "Phương thức thanh toán" Information has been selected As Expected Pass

Click next Switch to Confirm Step As Expected Pass

Select "Phường/Xã" Information has been selected As Expected Pass

Select "thời gian giao hàng" Information has been selected As Expected Pass

Select "Tỉnh" Information has been selected As Expected Pass

Select "Quận/Huyện" Information has been selected As Expected Pass

Select "hình thức nhận hàng" Information has been selected As Expected Pass

Enter "địa chỉ nhận hàng" Information has been entered As Expected Pass

Enter "Số điện thoại" Information has been entered As Expected Pass

Enter "Email" Information has been entered As Expected Pass

Click "Cart" icon Show the list of products that As Expected Pass

Click button "Đặt hàng ngay" Redirect to Payment page with As Expected Pass

Step # Step Details Expected Results Actual Results Pass / Fail / Not executed / Suspended

Login with user account Show successful login message and redirect to the home page

Thời gian giao hàng = Các ngày trong tuần Phương thức thanh toán = Thanh toán khi nhận hàng Ghi chú =""

Email_paypal = duc@gmail.com Password_paypal="Vinhduc14"

There is a list of products in the cart Email: 18110189@student.hcmute.edu

Hình thức nhận hàng = Tại nhà Địa chỉ nhận hàng = 58/1 Tây Sơn Tỉnh = Lâm Đồng, Quận/Huyện = Thành phố Bảo Lộc, Phường/Xã = Phường 2

Access to to the page https://localhost:3000/login Họ tên người nhận = Quỳnh

18110189@student.hcmute.edu.and Pass:

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Test Case ID Test Case Description

Created By Reviewed By Quỳnh Version

MS_10 Test Update profile function

11 Click "Save" Show message: "Cập nhật thông tin thành công" As Expected Pass

Select "Phường/Xã" Information has been selected As Expected Pass

Select "Tỉnh" Information has been selected As Expected Pass

Select "Quận/Huyện" Information has been selected As Expected Pass

Enter "địa chỉ nhận hàng" Information has been entered As Expected Pass

Enter "Họ và tên" Information has been entered As Expected Pass

Enter "Số điện thoại" Information has been entered As Expected Pass

Click "User" icon Redirect to Profile page As Expected Pass

Step # Step Details Expected Results Actual Results Pass / Fail / Not executed / Suspended

Upon successful login with a user account, the system should display a confirmation message and automatically redirect the user to the home page The expected result includes a specific address, which is 58/1 Tây Sơn, located in Lâm Đồng province, within the district of Thành phố Bảo Lộc, and more precisely in Phường 2.

Access to to the page https://localhost:3000/login Họ và tên = Quỳnh

18110189@student.hcmute.edu.and Pass:

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Test Case ID Test Case Description

Created By Reviewed By Quỳnh Version

MS_11 Test change password function

11 Click "Change password" Show message: "Đổi mật khẩu thành công" and change As Expected Pass

Enter "New Passsword" Information has been entered As Expected Pass

Select "Confirm Password" Information has been selected As Expected Pass

Click "Change Password" Show form to change password As Expected Pass

Enter "Current Password" Information has been entered As Expected Pass

Login with user account Show successful login message and redirect to the home page As Expected Pass

Click "User" icon Redirect to Profile page As Expected Pass

Step # Step Details Expected Results Actual Results Pass / Fail / Not executed / Suspended

Access to to the page https://localhost:3000/login Current Password = 12345aA

18110189@student.hcmute.edu.and Pass:

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Test Case ID Test Case Description

Created By Reviewed By Quỳnh Version

Mobile Application Testcases

- Check login function with empty password

Test Case ID Test Case Description

Created By Reviewed By Linh

Step # Step Details Expected Results

Account of user Email = 18128015@student.hcmute.edu.vn

Actual Results Pass / Fail / Not executed / Suspended

Test Case (Pass/Fail/Not Pass

Open app The login screen appears As Expected Pass

Enter Email Information has been entered As Expected Pass

Enter Password Information has been entered As Expected Pass

Click button Login Go to the main screen of the app As Expected Pass

MS_02 Check login function with empty password

Test Case ID Test Case Description

Created By Reviewed By Linh 1

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Account of user Email = 18128015@student.hcmute.edu.vn

Step # Step Details Expected Results Actual Results Pass / Fail / Not executed / Suspended

Open app The login screen appears As Expected Pass

Enter Email Information has been entered As Expected Pass

Click button Login Show message error As Expected Pass

- Test the function add products to cart

- Test the function of changing personal information

MS_03 Test the function add products to cart

Select "Màu" Information has been selected As Expected Pass

Click button "Add to cart" Notice that the product has been added to the cart

Select "Ram" Information has been selected As Expected Pass

Select "Dung lượng" Information has been selected As Expected Pass

Open app and login with user account.

Go to the main screen of the app As Expected Pass

Click select product "Điện thoại

Show product details and a button to add the product to the

Dung lượng = 64GB Màu = Xanh

Step # Step Details Expected Results Actual Results Pass / Fail / Not executed / Suspended

Login app with user account Email:

18128015@student.hcmute.edu.vn and Pass:

Product = Điện thoại Galaxy Z Flod 3 6GB 64GB

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Test Case ID Test Case Description

Created By Reviewed By Linh

MS_03 Test the function of changing personal information

9 Click button UPDATE Go back user information screen and user information updated As Expected Pass

Enter "Huyện/Thành phố" Information has been entered As Expected Pass

Enter "Xã/Phường" Information has been entered As Expected Pass

Click button "Đổi thông tin cá nhân"

Go to the personal information update screen

Enter "Tỉnh" Information has been entered As Expected Pass

Click button "Trang cá nhân" Go to user information screen of the app On this screen, there is a another menu icon

Click "menu" icon Show button "Đổi thông tin cá nhân" As Expected Pass

Open app and login with user account Go to the main screen of the app As Expected Pass

Click "menu" icon Show information of user, button

Step # Step Details Expected Results Actual Results Pass / Fail / Not executed / Suspended

Login app with user account Email:

18128015@student.hcmute.edu.vn and Pass:

Huyện/Thành phố = Dĩ An

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Test Case ID Test Case Description

Created By Reviewed By Linh

- Test the function of deleting products in the cart

MS_05 Test the function of deleting products in the cart

Test Case ID Test Case Description

Created By Reviewed By Linh 1

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Login app with user account Email:

18128015@student.hcmute.edu.vn and Pass:

There is a list of products in the cart

Step # Step Details Expected Results Actual Results Pass / Fail / Not executed / Suspended

Click x icon Show notification that the product has been deleted and product list updates itself with new data

Open app and login with user account.

Go to the main screen of the app As Expected Pass

Click "Cart" icon Show the list of products that have been added to the cart and

MS_06 Test password change function

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Test Case ID Test Case Description

Created By Reviewed By Linh

Login app with user account Email:

18128015@student.hcmute.edu.vn and Pass:

Current Password = 123456aA New Password = 1234567aA

Step # Step Details Expected Results Actual Results Pass / Fail / Not executed / Suspended

Click button "Trang cá nhân" Go to user information screen of the app On this screen, there is a h i

Open app and login with user account Go to the main screen of the app As Expected Pass

Click "menu" icon Show information of user, button

Enter "New Password" Information has been entered As Expected Pass

Click "menu" icon Show button "Đổi thông tin cá As Expected Pass

Click "Đổi mật khẩu" Go back user information screen and user information changed

Click button "Đổi mật khẩu" Go to the password change As Expected Pass

Enter "Confirm New Password" Information has been selected As Expected Pass

Enter "Current Password" Information has been entered As Expected Pass

- Test the payment function with COD

MS_07 Test the payment function with COD

Test Case ID Test Case Description

Created By Reviewed By Linh 1

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Tỉnh = Lâm Đồng, Quận/Huyện = Thành phố Bảo Lộc, Phường/Xã = Phường 2

Login app with user account Email:

18128015@student.hcmute.edu.vn and Pass:

There is a list of products in the cart Số điện thoại = 0393304218

Cửa hàng : Quận 1 Thành phố Hồ Chí Minh Hình thức nhận hàng = Tại nhà Địa chỉ nhận hàng = 58/1 Tây Sơn

Login with user account Show successful login message and go to Home screen

Thời gian giao hàng = Các ngày trong tuần Phương thức thanh toán = COD Ghi chú =""

Email_paypal = duc@gmail.com Password_paypal="Vinhduc14"

Step # Step Details Expected Results Actual Results Pass / Fail / Not executed / Suspended

Click "Cart" icon Show the list of products that As Expected Pass

Click button "Đặt hàng ngay" Go to Payment screen with step As Expected Pass

Enter "Họ tên" Information has been entered As Expected Pass

Enter "Số điện thoại" Information has been entered As Expected Pass

Select "Tỉnh" Information has been selected As Expected Pass

Select "Quận/Huyện" Information has been selected As Expected Pass

Select "Phường/Xã" Information has been selected As Expected Pass

Select "thời gian giao hàng" Information has been selected As Expected Pass

Click next Switch to Confirm Step As Expected Pass

Click next Switch to Complete Step As Expected Pass

Select "hình thức nhận hàng" Information has been selected As Expected Pass

Select "Phương thức thanh toán" Information has been selected As Expected Pass

Select "Cửa hàng" Information has been selected As Expected Pass

Click button "Thanh toán" Show message "Thanh toán thành công"

- Test the payment function with Paypal

MS_08 Test the payment function with Paypal

Test Case ID Test Case Description

Created By Reviewed By Linh Version

Login app with user account Email:

18128015@student.hcmute.edu.vn and Pass:

There is a list of products in the cart Số điện thoại = 0393304218

Tester's Name Date Tested 3/5/2022 Test Case (Pass/Fail/Not Pass

Thời gian giao hàng = Các ngày trong tuần Phương thức thanh toán = Online Ghi chú =""

Email_paypal = duc@gmail.com Password_paypal="Vinhduc14"

Cửa hàng của chúng tôi tọa lạc tại Quận 1, Thành phố Hồ Chí Minh, nhưng chúng tôi cũng hỗ trợ giao hàng tận nơi tại địa chỉ 58/1 Tây Sơn, Phường 2, Thành phố Bảo Lộc, Tỉnh Lâm Đồng.

Step # Step Details Expected Results Actual Results Pass / Fail / Not executed / Suspended

Login with user account Show successful login message and go to Home screen

Enter "Họ tên" Information has been entered As Expected Pass

Click "Cart" icon Show the list of products that As Expected Pass

Click button "Đặt hàng ngay" Go to Payment screen with step As Expected Pass

Select "Tỉnh" Information has been selected As Expected Pass

Select "Quận/Huyện" Information has been selected As Expected Pass

Enter "Số điện thoại" Information has been entered As Expected Pass

Click next Switch to Confirm Step As Expected Pass

Select "Phường/Xã" Information has been selected As Expected Pass

Select "thời gian giao hàng" Information has been selected As Expected Pass

Click next Switch to Complete Step As Expected Pass

Click button "Thanh toán qua

Paypal" Go to Paypal screen As Expected Pass

Select "hình thức nhận hàng" Information has been selected

Select "Phương thức thanh toán" Information has been selected As Expected Pass

Select "Cửa hàng" Information has been selected As Expected Pass

Enter "Email_paypal" Information has been entered As Expected Pass

Ngày đăng: 28/12/2023, 18:48

Nguồn tham khảo

Tài liệu tham khảo Loại Chi tiết
[1] “softwaretestinghelp,” [Trực tuyến]. Available: https://www.softwaretestinghelp.com/ Sách, tạp chí
Tiêu đề: softwaretestinghelp
[2] “SoftwareTtesting - wiki,” [Trực tuyến]. Available: https://en.wikipedia.org/wiki/Software_testing Sách, tạp chí
Tiêu đề: SoftwareTtesting - wiki
[3] “Testing Process - toolsqa,” [Trực tuyến]. Available: https://www.toolsqa.com/software-testing/test-process-in-software-testing/ Sách, tạp chí
Tiêu đề: Testing Process - toolsqa
[4] “Seven principles - guru99,” [Trực tuyến]. Available: https://www.guru99.com/software-testing-seven-principles.html Sách, tạp chí
Tiêu đề: Seven principles - guru99
[5] “Types of Testing techniques - elprocus,” [Trực tuyến]. Available: https://www.elprocus.com/what-are-testing-techniques-types-advantages-disadvantages/ Sách, tạp chí
Tiêu đề: Types of Testing techniques - elprocus
[6] “TestCase - guru99,” [Trực tuyến]. Available: https://www.guru99.com/test-case.html Sách, tạp chí
Tiêu đề: TestCase - guru99
[7] “softwaretestinghelp,” [Trực tuyến]. Available: https://www.softwaretestinghelp.com/ Sách, tạp chí
Tiêu đề: softwaretestinghelp
[8] “Automation Tesing,” [Trực tuyến]. Available: https://www.softwaretestinghelp.com/automation-testing-tutorial-1/ Sách, tạp chí
Tiêu đề: Automation Tesing
[9] “Goals and Objectives of Automation Testing,” [Trực tuyến]. Available: https://www.qamadness.com/automated-testing-goals-objectives/ Sách, tạp chí
Tiêu đề: Goals and Objectives of Automation Testing
[10] “Automation Testing process,” [Trực tuyến]. Available: https://www.tutorialspoint.com/qtp/qtp_test_automation_process.htm Sách, tạp chí
Tiêu đề: Automation Testing process
[11] “Benefits of Automation Testing,” [Trực tuyến]. Available: https://smartbear.com/blog/7- benefits-of-implementing-automated-testing/ Sách, tạp chí
Tiêu đề: Benefits of Automation Testing
[12] “Manual&Automation - guru99,” [Trực tuyến]. Available: https://www.guru99.com/difference-automated-vs-manual-testing.html Sách, tạp chí
Tiêu đề: Manual&Automation - guru99
[13] “NodeJs,” [Trực tuyến]. Available: https://en.wikipedia.org/wiki/Node.js Sách, tạp chí
Tiêu đề: NodeJs
[14] “npm,” [Trực tuyến]. Available: https://www.freecodecamp.org/news/what-is-npm-a-node-package-manager-tutorial-for-beginners/ Sách, tạp chí
Tiêu đề: npm
[15] “Java JDK - infoworld,” [Trực tuyến]. Available: https://www.infoworld.com/article/3296360/what-is-the-jdk-introduction-to-the-java-development-kit.html Sách, tạp chí
Tiêu đề: Java JDK - infoworld
[16] “Android SDK,” [Trực tuyến]. Available: https://en.wikipedia.org/wiki/Android_SDK Sách, tạp chí
Tiêu đề: Android SDK
[17] “Maven -simplilearn,” [Trực tuyến]. Available: https://topdev.vn/blog/maven-apache/ Sách, tạp chí
Tiêu đề: Maven -simplilearn
[18] “Gradle,” [Trực tuyến]. Available: https://docs.gradle.org/current/userguide/what_is_gradle.html Sách, tạp chí
Tiêu đề: Gradle
[19] “Page object model,” [Trực tuyến]. Available: https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/ Sách, tạp chí
Tiêu đề: Page object model
[20] “Selenium,” [Trực tuyến]. Available: https://testguild.com/selenium-4/ Sách, tạp chí
Tiêu đề: Selenium

HÌNH ẢNH LIÊN QUAN

Hình thức nhận hàng = Tại nhà Địa chỉ nhận hàng = 58/1 Tây Sơn - Study automation test and apply for system testing
Hình th ức nhận hàng = Tại nhà Địa chỉ nhận hàng = 58/1 Tây Sơn (Trang 122)
Hình ảnh = mobile.png - Study automation test and apply for system testing
nh ảnh = mobile.png (Trang 123)
Hình thức nhận hàng = Tại nhà Địa chỉ nhận hàng = 58/1 Tây Sơn Tỉnh = Lâm Đồng, Quận/Huyện = Thành phố Bảo Lộc, Phường/Xã = Phường 2 - Study automation test and apply for system testing
Hình th ức nhận hàng = Tại nhà Địa chỉ nhận hàng = 58/1 Tây Sơn Tỉnh = Lâm Đồng, Quận/Huyện = Thành phố Bảo Lộc, Phường/Xã = Phường 2 (Trang 125)
Hình thức nhận hàng = Tại nhà Địa chỉ nhận hàng = 58/1 Tây Sơn Tỉnh = Lâm Đồng, Quận/Huyện = Thành phố Bảo Lộc, Phường/Xã = Phường 2 - Study automation test and apply for system testing
Hình th ức nhận hàng = Tại nhà Địa chỉ nhận hàng = 58/1 Tây Sơn Tỉnh = Lâm Đồng, Quận/Huyện = Thành phố Bảo Lộc, Phường/Xã = Phường 2 (Trang 126)

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN