0% found this document useful (0 votes)
70 views47 pages

Automate Web Training Day 1

Accelq Training day 1

Uploaded by

Aparnna Panda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views47 pages

Automate Web Training Day 1

Accelq Training day 1

Uploaded by

Aparnna Panda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

Mastering Automation with ACCELQ

Instructor-led Automation Training

Unified Cloud Platform for Continuous Testing

W W W .AC C ELQ. COM


About ACCELQ
What makes us the Leader in Test
Automation domain
Lifecycle
Automation Futuristic alignment
with low-code citizen
development model
Deeper, real-world
alignment with
Agile and DevOps

A complete platform to realize


Business oriented approach to “ Automation-fi rst ”
automation, without compromising
on enterprise depth

Automation across
lifecycle process
areas

Design Studio Automation in Test Design, Test


Asset Management, “Source”
Where your application business Control, Change Management,
process come alive for Automated Test Strategy & Governance
end-to-end validations

AI-ML native to Codeless extendibility with


complete platform real-time Cloud power

Natural language automation, Autonomics Unlike “code injection” provisioning,


UI interaction, Self-healing Element ACCELQ provides a platform approach to
handling, Test combinatorial generation, extending evolving technologies UI,
Adaptive change impact backend, desktop, mobile alike

Proprietary & Confidential. Copyright 2023, ACCELQ Inc


Navigation and
Pre-Requisites
Basic navigation and Local Agent
installation
Navigating your way around ACCELQ

Top Navigation

Tabbed view for Entity details Global Search Create New Entity
ACCELQ application is built on a multi-tab Allows searching and accessing all the major Create a new Action, Scenario, Context or Test
architecture. An entity-details view opens in a new entities in the system. Commonly used to open Suite from here, no matter where you are in the
tab, making it easier to multi-task. various entities during day-to-day development. application..

Help Center Project Information User Profile


Comprehensive help for Learning Videos, Command Get detailed Information about the project currently Get details of the user that’s logged in,
Help, What’s New etc. logged in, including branch name, user Role etc. including the License(s) assigned, update user
Ability to switch between other assigned Projects. details etc.. Ability to navigate to Tenant Admin.

Proprietary & Confidential. Copyright 2023, ACCELQ Inc


Navigating your way around ACCELQ

Left Navigation
Tabbed view for Entity details
ACCELQ application is built on a multi-tab
architecture. An entity-details view opens in a new
tab, making it easier to multi-task.

Application Universe
Application Universe represents an abstraction
of your test application’s interactions. It depicts
various entities and their relationships. Navigator Grids
Navigator is a section in ACCELQ application where all the
core entities can be listed in a grid format. Allows extensive
filtering capabilities..

Resources
Resources section shows listing of support
entities that complement the core entities in
ACCELQ.

Results
Test results are summarized in the Result grid with
extensive filter capabilities.

Live Control Center


View and Manage connected Live Add-Ons
Proprietary & Confidential. Copyright 2023, ACCELQ Inc
Local Agent

Agent Command Center and Local Agent


Agent Command Center (ACC) ACCELQ Local Agent

• Installed on your local desktop, or in your execution lab • A software component that takes up and fulfils test
environment. execution requests initiated from ACCELQ.

• A portal that manages the Agent installation, maintenance • Enables the cloud-based ACCELQ server to run tests
and operations. remotely in the application's local network.

• Allows configuring Agent Properties as applicable for • Range of configuration options to support various use
your execution requirements cases.

• Can manage one or more Agents, centrally on one local • Hosts Playback Service which allows local validation
hardware. and troubleshooting of scripts during test development.

• Here are the installation instructions for Agent Command


Center

Proprietary & Confidential. Copyright 2023, ACCELQ Inc


Local Agent

Installation & Setup

Install Agent Command Center Playback Service

• Make sure the Playback Service is active, as displayed in the


• Download the ACC installable zip from Resources > Local
console toolbar of Design Studio.
Agents
• You may also set “auto-start on login” to automatically start
• Unzip the file and execute.
ACC upon your system login (under the config icon).

• Follow the wizard prompts and complete the process

• Retrieve API token from the Profile Icon > Auth


Information

Note Type acc:// in your Chrome browser to open the Agent Command Center.

Proprietary & Confidential. Copyright 2023, ACCELQ Inc


Hello World!
Build your first Automation Scenario
on ACCELQ
Hello World!

Credentials of application-Under-Test (AUT)

QBank
Retail & Corporate Banking Portal

URL https://qbank.accelq.com

Username john.todd
Password qbTrnPass1&

Proprietary & Confidential. Copyright 2023, ACCELQ Inc


Hello World!

Scenario to Automate

Scenario: Verify QBank Login

We will verify Login to the QBank Application using the credentials, and Logout.

Test steps

- Open the browser, and load QBank URL


- Login to Application with the given credentials
- Logout of QBank

Proprietary & Confidential. Copyright 2023, ACCELQ Inc


Hello World!

Recording Scenario in Design Studio


Create Scenario from the top-navigation “Create” menu and type the name of the Scenario.

Click, Save & Continue.

Navigate to Design Studio.

Record the Login & Logout flow

• Make sure the Local Agent is active and the Playback service is up.
• Type the URL in the Recorder browser. Make sure the Recorder button is enabled.
• Hover over the elements that you need to automate, and right-click.
• Choose necessary operation (Command) from the context menu.
• Complete the operation by providing inputs necessary for the Command.
• Repeat this for all the interactions you want to achieve in the test.

Note Design Studio is a powerful orchestration engine to fluidly record/playback automation Scenarios in a codeless paradigm.

Proprietary & Confidential. Copyright 2023, ACCELQ Inc


Hello World!
Finalizing the Scenario: Design-First Approach to
Automation
In Test Automation, Sustainability is the Key; and Design-First is the Way!

What is Design-First?
Prioritizing thoughtful design as a foundation for building reliable and maintainable test automation.

Why think about Design?


• Efficiency & Consistency: Reusable Actions ensure streamlined and error-free test creation.
• Maintainability: Like Lego bricks, Actions make tests easy to update and maintain.
• Scalability: Scale your testing efforts efficiently with a library of reusable Actions.
• Collaboration: Encourages teamwork by allowing concurrent Action development.

Note Remember, “CHANGE” is a “CONSTANT” in test automation; and be prepared for it from the get-go (why?).
Hello World!
Finalizing the Scenario: In 2 simple steps!
1 Modularize Login Scenario

• Select one or more statements that form a meaningful functional


block. Right-click and select “Create New Action and Replace”.
• Finalize the changes in the Design Studio once all
statements are converted to Actions.
• Give a meaningful name for the Action and type a descriptive
name for the application page in which the Action starts to run. • You get into Business Process view of the Scenario.

2 Parameterize the Action

• Select input information that you would like to parameterize


to facilitate data-driven testing.

NOTE • When you launch the URL in the Recorder, System already inserts an Action (step) in the Scenario, at the top (Init Action).

• Clearly distinguish between a “Command” statement which is an operation in the Scenario logic vs. the Action statement,
which is a functionally meaning Step in the business process!
Hello World!

Data Driving the Scenario

Test Case
A data-driven instance of a Scenario business process is a Test Case.

• You may create one or more Test Cases for a Scenario, when the Scenario Steps include Parameters
• One test case is created by default, with the values used in the Design Studio.
• Manage Test Cases from the Business Process view of the Scenario entity.

Let’s add another Test Case to our Login Scenario using following credentials for a bank Admin:

qbankadmin/qbTrnPass1&
Hello World!

Playback the Scenario

Open the Login Scenario in Design Studio


You may select the Test Case interested to load in Design Studio.

Playback the entire Scenario and notice the interactions in the Recorder browser.
Console Log shows the progress of test execution.

Note: Distinguish the execution that was happening during Recording, which is called “Auto-Playback”.
Hello World!

Run Scenario as Independent Job


Run the Scenario in an independent browser, either locally or on a remote machine.
Click the Run button in the Business Process view of the Scenario, or the Run button in the top navigation.

Extensive set of configuration options Distinguish between Playback and Independent


Job execution
• Test Scheduling
• Remote Agent or local execution Playback
• Cross-browser Testing
• Notifications • Troubleshooting and validation during development phase.
• Select Test Cases to Run • Instant feedback. Results only visible to the current user.
• Timeout configuration
Independent Job
• and more..
• For actual testing of AUT. Results globally available.
• Extensive configuration possibilities.
Hello World!

Test Results Overview

For an Independent test run, detailed test report can be accessed from the
Results grid or from the Results tab in the Scenario page.

• Left-nav with listing of Test Cases


• Step-by-step details of execution log, including execution time
• Slide show viewer for screenshot navigation
• Hints for execution errors
• Filter statements for errors-only
• Job information overview
• Create Defects, and Re-run a failed test
• Export to PDF, or email the report to a team member
Reuse Existing Actions
and Extend
Effortlessly extend to next Scenario,
by reusing existing Actions
Reuse and Extend
Example: Login and Verify Home Page

Scenario Name: Login to QBank and Verify Home Page

Let’s create a new Scenario that includes additional validation in Home Page, after login.

Test steps:

• Open the browser, and load QBank URL.


• Login to Application
• Verify you are in the home page, by checking the page contains text “Welcome back!”
• Logout of Application

Let’s create a new Scenario with this additional verification (do not update the existing Scenario).
Reuse and Extend

Recording new Scenario while reusing existing


Actions
• Create the Scenario and open it in the Design Studio. About Adaptive Relevance Engine

• Type the URL in the browser, and right-click on the Login field.
• Powerful capability that automatically
• Select Relevant Action (Login to QBank). predicts suggestions for the next steps in the
• Right-click on “Welcome back!” text and type “verify page”. Select flow, as you build a Scenario.
appropriate command. • In a continuous learning loop and adapts to
• Right-click on Logout button and select Relevant Action pill. user activity while you add/edit Scenarios.

• Playback the new Scenario and check out the console log!

• And Remember to convert statements into Actions before


finalizing the Scenario!!

Note: Acknowledge the text verification in the home page warrants to be an independent Action. Why?
Introduction to
Key Entities
Key Automation Entities in ACCELQ –
Action, Context and Scenario
Key Entities in ACCELQ
Scenario, Action & Context
Scenario Action Context
• Scenario represents an end-to-end test flow (a use • Action encapsulates a specific • Context represents a state of the
case) in the AUT, which can be “run” as a test. functionality available in a Context or Page application-under-test (AUT), such as
of the application-under-test (AUT). a page in your web application.
• A Scenario is created by assembling series of
Actions belonging to various Contexts (or Pages). • It represents a functionally meaningful • An Action originates from a Context
user action possible in a Context (or Page).
• Scenario is operated in two views: Business Process
View, Design Studio View

Note: “Navigator” in Left-Nav hosts all the key entities in ACCELQ.

Clearly Distinguish an Action from a Scenario

Scenario is a business process you are testing.


Action is a functionally meaningful, reusable block of logic that is used as a Step in a Scenario.

Proprietary & Confidential. Copyright 2023, ACCELQ Inc


Key Entities in ACCELQ
Scenario, Action & Context

Action is a Step in Scenario Context is the page where a Step occurs

Proprietary & Confidential. Copyright 2023, ACCELQ Inc


The Universe!
Important Glossary

• Action • Parameter (Action Input)


• Design Studio • Playback
• Agent • Playback Service
• Browser Init • Test Case
• Business Process View of a Scenario • Recorder
• Command • Result
• Relevance Engine • Scenario
• Command Inputs
• Independent Test Run
• Reusability
• Modularity
• Verify Page
• Action Granularity
Hands-on
20 mins
Successful recreation of work is pre-requisite
for the rest of the session
Best Practices
Key Entities in ACCELQ
Key Entities in ACCELQ
Best Practice: Entity Naming Convention
Scenario name should indicate a business process in clear terms

• “Verify Enrollment for a new Registrant”

• “Check enrolment”

Action name should indicate a “verb” describing its purpose, and not about “how” the purpose is achieved

• “Verification of Home Page, or Verifying Home Page”


• “Verify Home Page”

Context generally represents a page in your application. Be clear and unambiguous.

• “Details Page”

• “Case Details Page”

Test Case name should identify the data variation being exercised

• “Existing account holder”, “New registrant” etc.

• “Test case 1”
Key Entities in ACCELQ
Best Practice: What constitutes an Action?
An Action should encapsulate a functionality that has well-defined business semantic on an application– like a Step in a
business process.

• Each Action should represent a clear and specific task on a single page of the application. For instance, filling out a login
form or verifying transaction details on a page.
• Avoid mixing different tasks within a single Action, even if they are on the same page. For example, don't combine logging in
and forgot password logic in one Action.
• The size of an Action (logic in an Action) doesn't matter; it could be as short as one statement or involve many statements to
complete a task.
• Effective parameterization can avoid lot of Action duplication.

Action Granularity is the single most important consideration to achieve maintainable automation
Discuss how well-defined boundaries for Actions help mitigate maintenance efforts with ongoing application changes.
Elements and
Element Identification
Working with Element ID using Locator-
Free and Smart-Locator approaches
Elements & Element ID
What is an Element?
An Element refers to a UI field or control on the page that you are trying to interact with or verify in Automation.

Name some elements that we have used in the Scenarios so far.

Element Identification is the criteria you setup to uniquely identify the element on the screen when the test is running.

Two ways to identify Elements in ACCELQ

• Locator-Free: AI based approach to eliminate dependency on application DOM.


• Smart-Locator: Intelligent approach to identify an element using an optimal combination of DOM attributes.

In the examples so far, we have used Locator-Free.. as in… there were no Locators at all!
Elements & Element ID
Example: Verify QBank Notifications

Example Scenario: Verify Notifications on QBank

We will login to ACCELQ and navigate to the Notifications page by clicking the bell icon in the top.

Verify the heading in the notifications page, and then close the page by clicking the button in the top.

Test steps:

• Open the browser, and load QBank URL.


• Login to Application
• Navigate to the Notifications page
• Verify header text (“Notifications”) and click the close button.
• Logout of Application
Elements & Element ID
Record the Notifications Scenario

Create the Scenario and open in Design Studio.

Start recording the logic necessary for the business process.


When selecting commands on the Recorder context menu, you
will notice the following situations:
• Clicking on Notifications icon prompts for Element Name (logical name),
which get saved explicitly as Elements in the repository (Smart-Locator)

• Clicking on Close button prompts to confirm the locator approach.

• All other statements were recorded without any prompts related to


element identification.

Once done, Playback the entire Scenario and finalize with appropriate
modularity.
Elements & Element ID
What is Locator-free Approach?
• AI powered algorithm to utilize readable or textual information on screen to identify the Element.
• Element ID is embedded inline in the application logic statement, without the need for explicitly “saving” the Element.

• Test logic is resilient to the application DOM structure changes. (What is DOM?)
• Ambiguity (multi-matches) can be resolved using the concept of Anchor Text, Index or both.
• Dynamic text can be handled using various operators such as starts-with, ends-with, contains, regular expression etc.
(‘Close’ button in notifications page)

• Some Elements may not present a reliable Locator-Free option [For example, the Notifications icon in the example]

Note Locator-Free need not always rely only on visible text on the screen! A whole lot of parameters define “readable text”.

Note In a typical Application-under-test (AUT), 80% to 90% of Elements can be handled Locator-Free!!
Elements & Element ID
What is a Smart-Locator?
• ACCELQ constructs unique ID for an Element, using an optimal combination of DOM attributes of Element. Discuss what is
“Optimal”?
• Element is given an explicit name, and its identification criteria is stored in the Element Repository of the respective Context.
• Views are automatically captured to help with Element edits.
• Advanced patterns such as Container Elements are best handled with this approach.

• System may invoke Self-Healing in case of application changes, or incorrect Element ID criteria.

Note Elements stored as Smart-Locator have a “name”, and Statements in logic refer to this name!

Note When an Element is saved as a Smart-Locator, it is important to quickly review the system selected attributes by
opening the Element in the Elements side panel.
Elements & Element ID
3 support entities for Smart-Locators
1. Owner Context: Context in which a Smart Locator Element is stored.
All Smart-Locator Elements used by the Actions that originate from a Context are stored in that Context (page).

2. Element Repository: Listing of all available Smart-Locator Elements in a given Context.


There is one Repository per Context.

3. View: Is a snapshot of application image which contains a Smart Locator reference.


Allows you to configure/manage Smart-Locators.
Views are captured automatically as you record logic that involves Smart Locators.

Note You can explicitly store an Element in the repository, from the Recorder context menu by clicking the “Element …” button in the top.
Elements & Element ID
Default Approach to Element ID

Locator-Free is the default approach for Element ID from ACCELQ Recorder, or Logic Editor.

• You can manage this default behavior from Resources > Project Settings. Three options available:

o Default is Locator-free

o Default is Smart-Locator

o System to ask Locator Option when recording a statement.

• If a Locator-Free hint is not available for a given Element, it is stored as Smart-Locator automatically.

• If an Element is already stored as a Smart-Locator, then the default behavior is overridden.

• While recording a statement in the Recorder, click on [L/O] button in the context menu against a command to
explicitly select the type of Element ID to use.
Glossary

• Element
• Context
• Element Repository
• View
• Owner Context
• DOM
• Smart-Locator
• Locator-Free
• Anchor Text
• Label/Self-Text
• Label/Anchor-operator value operator
• Index
• Logical Name
All about
Playback!
Instantly validate your test logic,
troubleshoot and finalize
All about Playback
What is Playback
Playback is a local execution capability within the Logic Editor against the inbuilt Recorder browser.
• Playback offers instant feedback on execution result, allowing for efficient fine-tuning and troubleshooting.

• Browser state and overall execution state persists across multiple Playback requests, allowing you to switch across
Actions/Scenarios and continue Playback requests.

• Playback Service requires a locally running ACCELQ Agent on your desktop.

• Auto-Playback is a specific setting that executes statements in real-time as you type or record in the Logic Editor

Playback is supported for Web, API and middleware testing.

• All ERP apps like Salesforce, Oracle, MS Dynamics etc.

• REST API, DB, Message Queue, Files etc.

• Generic logic-based statements.

Playback is not currently supported for Mobile, Desktop or TE related automation statements.
All about Playback
How to Playback
How to Playback
• Click “Playback” toolbar menu, or Right-click on a statement, in the logic editor for context menu option

What you can Playback


You may playback the logic in an Action, or steps in a Scenario (in Design Studio view)

With statement selection Without selection


• Playback selected statements. • Playback entire Action or Scenario

• Playback up to the selected statement


(incl. of selected statements).

• Playback from the selected statements until the end of


Action/Scenario (incl. of selected statements).

Note Playback requests are queued up, so you may issue multiple Playback requests without waiting for completion.
All about Playback
Tracking Playback Progress
Logic editor margin area: Shows the status of playback, at a statement level:
• Queued up
• Running
• Completed , Failed
• Completed, Done

Playback Console: Prints verbose logs related to the execution progress.


• Console log is separately managed for each Action/Scenario where the request is triggered from.

Playback Toolbar: Indicates if any Playback is in progress in any Action/Scenario. Click for the Queue.
• Stop/terminate Playback requests if needed.

Note When Playback is stopped, currently executing statement will always run to completion.
Playback Settings

Extensive array of settings to Effective troubleshooting with


configure Playback Pause-On-Error setting

• Which App Environment to use for the • Playback execution pauses on


Global Properties in the logic. encountering an Element Error.
Allows you to analyze the element
• Web driver profile to use (in case
failure and update the fix in-the-flow.
custom browser execution behavior is
required)

• Timeout values to use (separate


control for Auto Playback, vs. On-
demand Playback, why?)

• Self-healing on/off
Hands-on
15 mins
Successful recreation of work is pre-requisite
for the rest of the session
Assignment
Example Scenario: Verify one-way flight booking
Write down examples of at least 2 Scenarios
in your own Application with following Step # Step Name (Action) Page Name (Context) Parameters
details. Choose Scenarios that consist of at
least 5 steps each. 1 Search for a flight Home Page
Origin, Destination, Travel Date,
Class of Service

• Names of steps (Actions) in each Scenario, as per 2 Select a flight Flight Results Page Preferred Airline

best practices.
3 Review Itinerary Itinerary Display Page Expected Price
• Parameters you can think of, for each Action
• Page Names where these steps are happening
4 Proceed to Checkout Itinerary Display Page

• Go ahead and Automate these Scenarios to the 5 Pay for the flight Payment Page Name, Credit Card Number
extent possible!

Best Practices

Naming Convention https://support.accelq.com/hc/en-us/articles/360019045711

Action Granularity https://support.accelq.com/hc/en-us/articles/360003427491

You might also like