SlideShare a Scribd company logo
1 of 41
1
2
Testing APEX Apps at a Glance
Kai Donato
KSCOPE 23, Aurora
3
Ihr Partner für den digitalen Wandel.
Individuelle IT-Lösungen aus einer Hand.
Facts and Numbers.
Founded 1994
Headquarters: Ratingen
Branches:
Frankfurt a.M., Köln,
München, Hamburg
> 360 Employees
ca. 48 Mio. €
Revenue in 2022
Training company
> 125 Customers
across industries
Vendor neutral
certified partner
of leading technology
comanies
4
About me
• Employee at MT GmbH in Ratingen since January
2014
• Department Manager APEX & JavaScript @ MT GmbH
• Project Leader and Developer (JavaScript & APEX)
• DOAG-Initiator – JavaScript
• Systems Integrations Specialist
UNIX-Server and Networkadministration
• Host on Devs on Tape Podcast
Kai Donato
@_KaiDonato
5
• 1
• 2
1. About Me
Why perform (automated) UI tests?
2.
What's out there?
3.
Testing APEX Applications
4.
Reporting
5.
Flakiness in automated UI testing
6.
Agenda
Why automated UI-Testing?
7
Why perform (automated) UI tests?
Required Information is provided
All Workflows work correctly
Save time
Error-Message validation
Ensure User Authorization works correctly
What‘s out there?
9
What's out there?
?
(…)
Testing APEX-Applications
11
Testing APEX Apps - Requirements
Offer extensive reporting options
Session management
Handle Flakiness
Handle different page contexts
Make interactions with page elements easy
12
Testing APEX Applications
Locating Page Elements – How can we find this button?
<button id="submit_bttn" data-test-id="submit" class="t-Button--hot">Submit</button>
Element Type Element Id Id only for testing CSS class Element text
(what the user sees)
Using…
• CSS selector syntax
• #submit_bttn
• button[data-test-
id=submit]
• .t-Button--hot
• Xpath selector syntax
• //button[@id=‘submit_bttn’]
• //button[@data-test-id=‘submit’]
• //button[@class=‘t-Button--hot’]
• //button[text()=‘Submit’]
13
Testing APEX Applications
<button id="submit_bttn" data-test-id="submit" class="t-Button--hot">Submit</button>
Element Type Element Id Id only for testing CSS class Element text
(what the user sees)
Locating Page Elements – Cypress
cy.get('#submit_bttn'); // CSS selector support
cy.xpath("//button[text()='Submit']"); // XPath selector support (*)
cy.get('.t-Button--hot').contains('Submit'); // Use CSS selectors, still query by text
14
Testing APEX Applications
<button id="submit_bttn" data-test-id="submit" class="t-Button--hot">Submit</button>
Element Type Element Id Id only for testing CSS class Element text
(what the user sees)
Locating Page Elements – Playwright
await page.locator("#submit_bttn"); // CSS selector support
await page.locator("//button//span[text()='Submit']"); // Xpath selector support
await page.locator('button:has-text("Submit")'); // CSS selector + query by text
await page.locator('text="Submit"'); // Get element only by text
15
Testing APEX Applications
Page Contexts
16
Testing APEX Applications
Page Contexts
17
Testing APEX Applications
Dealing with Iframes - Playwright
const iframe = await page.frameLocator('iframe');
await iframe.locator('#P7_CUST_FIRST_NAME').type('Max');
await iframe.locator('#P7_CUST_LAST_NAME').type('Mustermann');
await iframe.locator('#P7_CUST_STATE').selectOption({ label: 'Hawaii' });
await iframe.locator('#P7_CUST_POSTAL_CODE').type('44789');
await iframe.locator('#P7_CREDIT_LIMIT').type('5000');
await iframe.locator('text=Add Customer').click();
18
Testing APEX Applications
Dealing with Iframes - Cypress
cy.getIframe().find('#P7_CUST_FIRST_NAME').type('Max');
cy.getIframe().find('#P7_CUST_LAST_NAME').type('Mustermann');
cy.getIframe().find('#P7_CUST_STATE').select('Hawaii');
cy.getIframe().find('#P7_CUST_POSTAL_CODE').type('44789');
cy.getIframe().find('#P7_CREDIT_LIMIT').type('5000');
cy.getIframe().xpath("//button/span[text()='Add Customer']").click();
Cypress.Commands.add('getIframe', () => {
return cy
.get('div[role=dialog] iframe', {log: false})
.its('0.contentDocument.body', {log:false}).should('not.be.empty’)
.then(cy.wrap, {log: false});
});
19
Testing APEX Applications
Session Management - Navigating within the current session
Standard URLs
Friendly URLs
https://hostname:port/ords/f?p=<app_id>:<page_number>:<session_id>
https://hostname:port/ords/path_prefix/r/app_alias/page_alias?session=13766599855150
20
Testing APEX Applications
Navigating within the current session - Cypress
describe('sample test', () => {
beforeEach(() => {
cy.visit('https://apex.generationcode.de/ords/f?p=100:LOGIN_DESKTOP’);
cy.get('#P101_USERNAME').type('user');
cy.get('#P101_PASSWORD').type('*********', {log: false});
cy.get('#P101_LOGIN').click();
cy.url().should('contain', 'f?p=100:1:').then($url => {
window.app_url = $url
});
})
it('go to customers page', () => {
cy.visit(app_url.replace(':1:', ':2:'));
})
})
Approach from Hayden Hudson, see: https://www.youtube.com/watch?v=QFzN_0soxiQ&t=4641s
21
Testing APEX Applications
Navigating within the current session - Playwright
test.describe('demo', () => {
test.beforeEach(async ({ page}) => {
await page.goto('https://apex.generationcode.de/ords/f?p=100:');
await page.locator('#P101_USERNAME').type('user');
await page.locator('#P101_PASSWORD').type('*********');
await page.locator('text=Sign In').click();
await expect(page).toHaveURL(/(?<=.)(f?p=100:1:)(?=.)/gm);
});
test('go to page 2', async ({ page }) => {
await page.goto(page.url().replace(':1:', ':2:'))
});
});
Reporting
23
Reporting and Dashboards
Cypress
24
Reporting and Dashboards
Playwright
Flakiness
26
Flakiness
Flakiness = The test outcome can switch between pass and fail throughout multiple runs
without any changes to the test code.
Time
27
Thoughts on Flakiness
Flakiness can never be reduced to zero
Flaky tests can be useful (initially)
28
Solutions to Flakiness - Playwright
Auto-waiting and actionability checks
Before an element is being interacted with, Playwright makes sure that it
is ready for the interaction.
await page.locator("//button//span[text()='Sign In']").click();
• Retries until element is found or timeout is reached
• Performs actionabilty checks before “click”-action is executed
29
Solutions to Flakiness - Playwright
Actionability checks
• Element is attached to the DOM/ a Shadow Root
• Element is visible
• Element is stable
#sign_in_bttn {
visibility: hidden;
display: none;
}
30
Solutions to Flakiness - Playwright
Actionability checks
• Element is enabled and editable
<button type="button" class="a-Button" disabled data-action="reset-report">Reset</button>
• Element receives events
Overlay
31
Our approach to automated testing
32
LCT
LCT in a nutshell
Node.js Server
APEX
Database
33
LCT
Interacting with page elements
 Simply select the element you want to interact
with
 No need to worry about selectors
 Select Interactive Grid columns as well
 For custom page elements, manually entering
Xpath or CSS selector is also supported
34
LCT
Working with iframes
35
LCT
Reporting (Preview)
 Screenshots on step
failure
 Get extensive
information on what
went wrong
 See execution times of
each step
36
LCT
Test APEX Standard Components easily and quickly
await page.locator('#P630_POPUP_LOV_DEFAULT_MULTI_COL_lov_btn').click();
await page.locator('.a-PopupLOV-searchBar input').type('Display1’);
await page.locator('#PopupLov_630_P630_POPUP_LOV_DEFAULT_MULTI_COL_dlg button').click();
await page.locator('//span[@class="popup-lov-highlight"][text()="Display1"]', ).click();
37
Get in touch!
@lct-
apex
@LowCodeTesting
lct.software
38
Flows for APEX
BPMN 2.0 Workflows for APEX • Open Source
• Community Driven
• Support available
39
Subscribe to get notified!
You heard
it here first!
#kscope23
40
Questions?
Kai Donato
Department Manager APEX & JavaScript
Telefon: +49 2102 30 961-0
Mobil: +49 173 8937790
Mail: kai.donato@mt-itsolutions.com
MT GmbH
Balcke-Dürr-Allee 9
40882 Ratingen
www.mt-itsolutions.com
41

More Related Content

Similar to Testing APEX apps At A Glance

Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...
Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...
Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...Ondřej Machulda
 
Unit-testing and E2E testing in JS
Unit-testing and E2E testing in JSUnit-testing and E2E testing in JS
Unit-testing and E2E testing in JSMichael Haberman
 
Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"Fwdays
 
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosUnit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosFlutter Agency
 
Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...
Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...
Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...Learnosity
 
An Introduction to Web Components
An Introduction to Web ComponentsAn Introduction to Web Components
An Introduction to Web ComponentsRed Pill Now
 
Top100summit 谷歌-scott-improve your automated web application testing
Top100summit  谷歌-scott-improve your automated web application testingTop100summit  谷歌-scott-improve your automated web application testing
Top100summit 谷歌-scott-improve your automated web application testingdrewz lin
 
Qtp interview questions3
Qtp interview questions3Qtp interview questions3
Qtp interview questions3Ramu Palanki
 
Qtp interview questions3
Qtp interview questions3Qtp interview questions3
Qtp interview questions3Ramu Palanki
 
Hp Quick Test Professional
Hp Quick Test ProfessionalHp Quick Test Professional
Hp Quick Test Professionalsunny.deb
 
Qtp 9.2 examples
Qtp 9.2 examplesQtp 9.2 examples
Qtp 9.2 examplesmedsherb
 
Qtp Training
Qtp TrainingQtp Training
Qtp Trainingmehramit
 
B2. activity and intent
B2. activity and intentB2. activity and intent
B2. activity and intentPERKYTORIALS
 
Agile methodologies based on BDD and CI by Nikolai Shevchenko
Agile methodologies based on BDD and CI by Nikolai ShevchenkoAgile methodologies based on BDD and CI by Nikolai Shevchenko
Agile methodologies based on BDD and CI by Nikolai ShevchenkoMoldova ICT Summit
 
Interview questions in qtp
Interview questions in qtpInterview questions in qtp
Interview questions in qtpRamu Palanki
 
Less03 2 e_testermodule_2
Less03 2 e_testermodule_2Less03 2 e_testermodule_2
Less03 2 e_testermodule_2Suresh Mishra
 
UEMB270: Software Distribution Under The Hood
UEMB270: Software Distribution Under The HoodUEMB270: Software Distribution Under The Hood
UEMB270: Software Distribution Under The HoodIvanti
 
ITGM8. Всеволод Брекелов (Grid Dinamics) Component tests. let's do that!
ITGM8. Всеволод Брекелов (Grid Dinamics) Component tests. let's do that!ITGM8. Всеволод Брекелов (Grid Dinamics) Component tests. let's do that!
ITGM8. Всеволод Брекелов (Grid Dinamics) Component tests. let's do that!SPB SQA Group
 
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Ukraine
 

Similar to Testing APEX apps At A Glance (20)

Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...
Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...
Workshop: Functional testing made easy with PHPUnit & Selenium (phpCE Poland,...
 
Unit-testing and E2E testing in JS
Unit-testing and E2E testing in JSUnit-testing and E2E testing in JS
Unit-testing and E2E testing in JS
 
Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"
 
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosUnit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
 
Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...
Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...
Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...
 
An Introduction to Web Components
An Introduction to Web ComponentsAn Introduction to Web Components
An Introduction to Web Components
 
Top100summit 谷歌-scott-improve your automated web application testing
Top100summit  谷歌-scott-improve your automated web application testingTop100summit  谷歌-scott-improve your automated web application testing
Top100summit 谷歌-scott-improve your automated web application testing
 
Qtp interview questions3
Qtp interview questions3Qtp interview questions3
Qtp interview questions3
 
Qtp interview questions3
Qtp interview questions3Qtp interview questions3
Qtp interview questions3
 
Angular2 + rxjs
Angular2 + rxjsAngular2 + rxjs
Angular2 + rxjs
 
Hp Quick Test Professional
Hp Quick Test ProfessionalHp Quick Test Professional
Hp Quick Test Professional
 
Qtp 9.2 examples
Qtp 9.2 examplesQtp 9.2 examples
Qtp 9.2 examples
 
Qtp Training
Qtp TrainingQtp Training
Qtp Training
 
B2. activity and intent
B2. activity and intentB2. activity and intent
B2. activity and intent
 
Agile methodologies based on BDD and CI by Nikolai Shevchenko
Agile methodologies based on BDD and CI by Nikolai ShevchenkoAgile methodologies based on BDD and CI by Nikolai Shevchenko
Agile methodologies based on BDD and CI by Nikolai Shevchenko
 
Interview questions in qtp
Interview questions in qtpInterview questions in qtp
Interview questions in qtp
 
Less03 2 e_testermodule_2
Less03 2 e_testermodule_2Less03 2 e_testermodule_2
Less03 2 e_testermodule_2
 
UEMB270: Software Distribution Under The Hood
UEMB270: Software Distribution Under The HoodUEMB270: Software Distribution Under The Hood
UEMB270: Software Distribution Under The Hood
 
ITGM8. Всеволод Брекелов (Grid Dinamics) Component tests. let's do that!
ITGM8. Всеволод Брекелов (Grid Dinamics) Component tests. let's do that!ITGM8. Всеволод Брекелов (Grid Dinamics) Component tests. let's do that!
ITGM8. Всеволод Брекелов (Grid Dinamics) Component tests. let's do that!
 
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
 

More from Kai Donato

APEX Offline – The missing Link
APEX Offline – The missing LinkAPEX Offline – The missing Link
APEX Offline – The missing LinkKai Donato
 
>> How toTech-Forward >>
>> How toTech-Forward >>>> How toTech-Forward >>
>> How toTech-Forward >>Kai Donato
 
ICIS User Group - Oberflächentests mittels LCT deklarativ angehen
ICIS User Group - Oberflächentests mittels LCT deklarativ angehenICIS User Group - Oberflächentests mittels LCT deklarativ angehen
ICIS User Group - Oberflächentests mittels LCT deklarativ angehenKai Donato
 
Click, Click, Test - Automated Tests for APEX Applications
Click, Click, Test - Automated Tests for APEX ApplicationsClick, Click, Test - Automated Tests for APEX Applications
Click, Click, Test - Automated Tests for APEX ApplicationsKai Donato
 
Full Stack Development mit JavaScript
Full Stack Development mit JavaScriptFull Stack Development mit JavaScript
Full Stack Development mit JavaScriptKai Donato
 
APEX and additional Templating Engines
APEX and additional Templating EnginesAPEX and additional Templating Engines
APEX and additional Templating EnginesKai Donato
 
JavaScript-Erweiterungen für UI und UX
JavaScript-Erweiterungen für UI und UXJavaScript-Erweiterungen für UI und UX
JavaScript-Erweiterungen für UI und UXKai Donato
 
WebSocket my APEX!
WebSocket my APEX!WebSocket my APEX!
WebSocket my APEX!Kai Donato
 
Professional JavaScript Error-Logging
Professional JavaScript Error-LoggingProfessional JavaScript Error-Logging
Professional JavaScript Error-LoggingKai Donato
 
Node.js - Von der Entwicklugn bis zum produktiven Einsatz
Node.js - Von der Entwicklugn bis zum produktiven EinsatzNode.js - Von der Entwicklugn bis zum produktiven Einsatz
Node.js - Von der Entwicklugn bis zum produktiven EinsatzKai Donato
 
Managing Node.js Instances with Oracle APEX
Managing Node.js Instances with Oracle APEXManaging Node.js Instances with Oracle APEX
Managing Node.js Instances with Oracle APEXKai Donato
 
Echtzeitvisualisierung von Twitter und Co.
Echtzeitvisualisierung von Twitter und Co.Echtzeitvisualisierung von Twitter und Co.
Echtzeitvisualisierung von Twitter und Co.Kai Donato
 
Avoid Network-Issues and Polling
Avoid Network-Issues and PollingAvoid Network-Issues and Polling
Avoid Network-Issues and PollingKai Donato
 

More from Kai Donato (13)

APEX Offline – The missing Link
APEX Offline – The missing LinkAPEX Offline – The missing Link
APEX Offline – The missing Link
 
>> How toTech-Forward >>
>> How toTech-Forward >>>> How toTech-Forward >>
>> How toTech-Forward >>
 
ICIS User Group - Oberflächentests mittels LCT deklarativ angehen
ICIS User Group - Oberflächentests mittels LCT deklarativ angehenICIS User Group - Oberflächentests mittels LCT deklarativ angehen
ICIS User Group - Oberflächentests mittels LCT deklarativ angehen
 
Click, Click, Test - Automated Tests for APEX Applications
Click, Click, Test - Automated Tests for APEX ApplicationsClick, Click, Test - Automated Tests for APEX Applications
Click, Click, Test - Automated Tests for APEX Applications
 
Full Stack Development mit JavaScript
Full Stack Development mit JavaScriptFull Stack Development mit JavaScript
Full Stack Development mit JavaScript
 
APEX and additional Templating Engines
APEX and additional Templating EnginesAPEX and additional Templating Engines
APEX and additional Templating Engines
 
JavaScript-Erweiterungen für UI und UX
JavaScript-Erweiterungen für UI und UXJavaScript-Erweiterungen für UI und UX
JavaScript-Erweiterungen für UI und UX
 
WebSocket my APEX!
WebSocket my APEX!WebSocket my APEX!
WebSocket my APEX!
 
Professional JavaScript Error-Logging
Professional JavaScript Error-LoggingProfessional JavaScript Error-Logging
Professional JavaScript Error-Logging
 
Node.js - Von der Entwicklugn bis zum produktiven Einsatz
Node.js - Von der Entwicklugn bis zum produktiven EinsatzNode.js - Von der Entwicklugn bis zum produktiven Einsatz
Node.js - Von der Entwicklugn bis zum produktiven Einsatz
 
Managing Node.js Instances with Oracle APEX
Managing Node.js Instances with Oracle APEXManaging Node.js Instances with Oracle APEX
Managing Node.js Instances with Oracle APEX
 
Echtzeitvisualisierung von Twitter und Co.
Echtzeitvisualisierung von Twitter und Co.Echtzeitvisualisierung von Twitter und Co.
Echtzeitvisualisierung von Twitter und Co.
 
Avoid Network-Issues and Polling
Avoid Network-Issues and PollingAvoid Network-Issues and Polling
Avoid Network-Issues and Polling
 

Recently uploaded

Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 

Recently uploaded (20)

Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 

Testing APEX apps At A Glance

  • 1. 1
  • 2. 2 Testing APEX Apps at a Glance Kai Donato KSCOPE 23, Aurora
  • 3. 3 Ihr Partner für den digitalen Wandel. Individuelle IT-Lösungen aus einer Hand. Facts and Numbers. Founded 1994 Headquarters: Ratingen Branches: Frankfurt a.M., Köln, München, Hamburg > 360 Employees ca. 48 Mio. € Revenue in 2022 Training company > 125 Customers across industries Vendor neutral certified partner of leading technology comanies
  • 4. 4 About me • Employee at MT GmbH in Ratingen since January 2014 • Department Manager APEX & JavaScript @ MT GmbH • Project Leader and Developer (JavaScript & APEX) • DOAG-Initiator – JavaScript • Systems Integrations Specialist UNIX-Server and Networkadministration • Host on Devs on Tape Podcast Kai Donato @_KaiDonato
  • 5. 5 • 1 • 2 1. About Me Why perform (automated) UI tests? 2. What's out there? 3. Testing APEX Applications 4. Reporting 5. Flakiness in automated UI testing 6. Agenda
  • 7. 7 Why perform (automated) UI tests? Required Information is provided All Workflows work correctly Save time Error-Message validation Ensure User Authorization works correctly
  • 11. 11 Testing APEX Apps - Requirements Offer extensive reporting options Session management Handle Flakiness Handle different page contexts Make interactions with page elements easy
  • 12. 12 Testing APEX Applications Locating Page Elements – How can we find this button? <button id="submit_bttn" data-test-id="submit" class="t-Button--hot">Submit</button> Element Type Element Id Id only for testing CSS class Element text (what the user sees) Using… • CSS selector syntax • #submit_bttn • button[data-test- id=submit] • .t-Button--hot • Xpath selector syntax • //button[@id=‘submit_bttn’] • //button[@data-test-id=‘submit’] • //button[@class=‘t-Button--hot’] • //button[text()=‘Submit’]
  • 13. 13 Testing APEX Applications <button id="submit_bttn" data-test-id="submit" class="t-Button--hot">Submit</button> Element Type Element Id Id only for testing CSS class Element text (what the user sees) Locating Page Elements – Cypress cy.get('#submit_bttn'); // CSS selector support cy.xpath("//button[text()='Submit']"); // XPath selector support (*) cy.get('.t-Button--hot').contains('Submit'); // Use CSS selectors, still query by text
  • 14. 14 Testing APEX Applications <button id="submit_bttn" data-test-id="submit" class="t-Button--hot">Submit</button> Element Type Element Id Id only for testing CSS class Element text (what the user sees) Locating Page Elements – Playwright await page.locator("#submit_bttn"); // CSS selector support await page.locator("//button//span[text()='Submit']"); // Xpath selector support await page.locator('button:has-text("Submit")'); // CSS selector + query by text await page.locator('text="Submit"'); // Get element only by text
  • 17. 17 Testing APEX Applications Dealing with Iframes - Playwright const iframe = await page.frameLocator('iframe'); await iframe.locator('#P7_CUST_FIRST_NAME').type('Max'); await iframe.locator('#P7_CUST_LAST_NAME').type('Mustermann'); await iframe.locator('#P7_CUST_STATE').selectOption({ label: 'Hawaii' }); await iframe.locator('#P7_CUST_POSTAL_CODE').type('44789'); await iframe.locator('#P7_CREDIT_LIMIT').type('5000'); await iframe.locator('text=Add Customer').click();
  • 18. 18 Testing APEX Applications Dealing with Iframes - Cypress cy.getIframe().find('#P7_CUST_FIRST_NAME').type('Max'); cy.getIframe().find('#P7_CUST_LAST_NAME').type('Mustermann'); cy.getIframe().find('#P7_CUST_STATE').select('Hawaii'); cy.getIframe().find('#P7_CUST_POSTAL_CODE').type('44789'); cy.getIframe().find('#P7_CREDIT_LIMIT').type('5000'); cy.getIframe().xpath("//button/span[text()='Add Customer']").click(); Cypress.Commands.add('getIframe', () => { return cy .get('div[role=dialog] iframe', {log: false}) .its('0.contentDocument.body', {log:false}).should('not.be.empty’) .then(cy.wrap, {log: false}); });
  • 19. 19 Testing APEX Applications Session Management - Navigating within the current session Standard URLs Friendly URLs https://hostname:port/ords/f?p=<app_id>:<page_number>:<session_id> https://hostname:port/ords/path_prefix/r/app_alias/page_alias?session=13766599855150
  • 20. 20 Testing APEX Applications Navigating within the current session - Cypress describe('sample test', () => { beforeEach(() => { cy.visit('https://apex.generationcode.de/ords/f?p=100:LOGIN_DESKTOP’); cy.get('#P101_USERNAME').type('user'); cy.get('#P101_PASSWORD').type('*********', {log: false}); cy.get('#P101_LOGIN').click(); cy.url().should('contain', 'f?p=100:1:').then($url => { window.app_url = $url }); }) it('go to customers page', () => { cy.visit(app_url.replace(':1:', ':2:')); }) }) Approach from Hayden Hudson, see: https://www.youtube.com/watch?v=QFzN_0soxiQ&t=4641s
  • 21. 21 Testing APEX Applications Navigating within the current session - Playwright test.describe('demo', () => { test.beforeEach(async ({ page}) => { await page.goto('https://apex.generationcode.de/ords/f?p=100:'); await page.locator('#P101_USERNAME').type('user'); await page.locator('#P101_PASSWORD').type('*********'); await page.locator('text=Sign In').click(); await expect(page).toHaveURL(/(?<=.)(f?p=100:1:)(?=.)/gm); }); test('go to page 2', async ({ page }) => { await page.goto(page.url().replace(':1:', ':2:')) }); });
  • 26. 26 Flakiness Flakiness = The test outcome can switch between pass and fail throughout multiple runs without any changes to the test code. Time
  • 27. 27 Thoughts on Flakiness Flakiness can never be reduced to zero Flaky tests can be useful (initially)
  • 28. 28 Solutions to Flakiness - Playwright Auto-waiting and actionability checks Before an element is being interacted with, Playwright makes sure that it is ready for the interaction. await page.locator("//button//span[text()='Sign In']").click(); • Retries until element is found or timeout is reached • Performs actionabilty checks before “click”-action is executed
  • 29. 29 Solutions to Flakiness - Playwright Actionability checks • Element is attached to the DOM/ a Shadow Root • Element is visible • Element is stable #sign_in_bttn { visibility: hidden; display: none; }
  • 30. 30 Solutions to Flakiness - Playwright Actionability checks • Element is enabled and editable <button type="button" class="a-Button" disabled data-action="reset-report">Reset</button> • Element receives events Overlay
  • 31. 31 Our approach to automated testing
  • 32. 32 LCT LCT in a nutshell Node.js Server APEX Database
  • 33. 33 LCT Interacting with page elements  Simply select the element you want to interact with  No need to worry about selectors  Select Interactive Grid columns as well  For custom page elements, manually entering Xpath or CSS selector is also supported
  • 35. 35 LCT Reporting (Preview)  Screenshots on step failure  Get extensive information on what went wrong  See execution times of each step
  • 36. 36 LCT Test APEX Standard Components easily and quickly await page.locator('#P630_POPUP_LOV_DEFAULT_MULTI_COL_lov_btn').click(); await page.locator('.a-PopupLOV-searchBar input').type('Display1’); await page.locator('#PopupLov_630_P630_POPUP_LOV_DEFAULT_MULTI_COL_dlg button').click(); await page.locator('//span[@class="popup-lov-highlight"][text()="Display1"]', ).click();
  • 38. 38 Flows for APEX BPMN 2.0 Workflows for APEX • Open Source • Community Driven • Support available
  • 39. 39 Subscribe to get notified! You heard it here first! #kscope23
  • 40. 40 Questions? Kai Donato Department Manager APEX & JavaScript Telefon: +49 2102 30 961-0 Mobil: +49 173 8937790 Mail: kai.donato@mt-itsolutions.com MT GmbH Balcke-Dürr-Allee 9 40882 Ratingen www.mt-itsolutions.com
  • 41. 41

Editor's Notes

  1. https://www.stern.de/wirtschaft/job/tokio--café-hilft-gaesten-gegen-das-aufschieben-von-arbeit-31807362.html
  2. https://www.stern.de/wirtschaft/job/tokio--café-hilft-gaesten-gegen-das-aufschieben-von-arbeit-31807362.html