際際滷

際際滷Share a Scribd company logo
Testing Alfresco extensions
(no, its not about jUnit)

07/11/2013
Alexey Ermakov / ITD Systems

#SummitNow
2

Whats the target?





REST APIs tests
UI tests
complex behavioral scenarios
easy-to-write tests

#SummitNow
#SummitNow
3

Why?

Theres Alfresco SDK and jUnit that already
allow you to run tests with repository
embedded to your Java code.

#SummitNow
#SummitNow
4

Because we can!

#SummitNow
#SummitNow
5

Whats inside?
 Python as the main tests language
 Proboscis as a core testing framework
 Selenium as a web browser emulator

#SummitNow
#SummitNow
6

But where is your framework?
Repository tests:
 Python wrappers for REST calls
 Out-of-the-box implementation for few
standard REST APIs

#SummitNow
#SummitNow
7

Example
from pyalfresco import alfresco
from proboscis.asserts import assert_equal
alf = alfresco.Alfresco()
assert_equal(
alf.get_person('admin').firstName,
'Administrator)

#SummitNow
#SummitNow
8

Example
def get_task(self, id):
return WrapperObject(
self,
**self.repo_get_json(
'api/task-instances/%s' % id
)
)

#SummitNow
#SummitNow
9

OK, whats about UI tests?
UI tests:
 Predefined classes and decorators to run
tests only for specific browsers

#SummitNow
#SummitNow
10

OK, whats about UI tests?
UI tests:
 Predefined classes and decorators to run
tests only for specific browsers
 Predefined APIs to interact with Alfresco
Share forms system

#SummitNow
#SummitNow
11

Example
from pyalfresco.tests import *
@for_browsers(['ie', 'firefox'])
class DashletTest(AlfrescoShareTest):
pass

#SummitNow
#SummitNow
12

Dashlet to test

#SummitNow
#SummitNow
13

Workflow start form

#SummitNow
#SummitNow
14

Testing dashlet
class WorkflowShortcutsDashlet(AlfrescoShareObject):
def locate(self):
self.el = self.driver.find_element_by_css_selector(
'.dashlet.workflow-shortcuts
)

#SummitNow
#SummitNow
15

Testing dashlet
@test
def locate_dashlet(self):
self.perform_share_log_in('admin', 'admin')
self.driver.get(URL + '/page/user/admin/dashboard')
self.dashlet = WorkflowShortcutsDashlet(
parent=None, driver=self.driver
)
self.dashlet.locate()

#SummitNow
#SummitNow
16

Testing dashlet
@test(depends_on=[locate_dashlet])
def launch_workflows(self):
for w in self.dashlet.get_workflows().keys():
self.dashlet.launch_workflow(w)

#SummitNow
#SummitNow
17

Testing form
<appearance>
<field id="bpm:workflowDescription" />
<field id="bpm:assignee">
<control template="/orgchart-picker.ftl" />
</field>
</appearance>

#SummitNow
#SummitNow
18

Testing form
f = AlfrescoShareWorkflowForm(
workflow_id='activiti$wf', parent=self, fields=[
{
'name': 'bpm:workflowDescription',
'control': AlfrescoShareFormTextFieldControl
},
...
])

#SummitNow
#SummitNow
19

Testing form
tffc = f.get_field_control('bpm:workflowDescription')
tffc.set_text('DESCRIPTION')
ocfc = f.get_field_control('bpm:assignee')
ocfc.show_picker()
ocfc.search('admin')
ocfc.add_person('Administrator')
ocfc.close_picker()
f.submit()

#SummitNow
#SummitNow
20

Hm, what about complex tests?
1.
2.
3.
4.
5.

Create UI test
Verify results with REST bindings
Perform REST APIs tests

PROFIT!!

#SummitNow
#SummitNow
21

Roadmap
 More wrappers for REST APIs
 More predefined form controls
 Improvements to framework code

#SummitNow
#SummitNow
22

Stay in touch
Follow us: @itdsystems
Join the project: http://git.io/qzeE1Q

#SummitNow
#SummitNow
Ad

Recommended

Backing Data Silo Atack: Alfresco sharding, SOLR for non-flat objects
Backing Data Silo Atack: Alfresco sharding, SOLR for non-flat objects
ITD Systems
External Master Data in Alfresco: Integrating and Keeping Metadata Consistent...
External Master Data in Alfresco: Integrating and Keeping Metadata Consistent...
ITD Systems
Dynamic bpm design by doing lightning talk
Dynamic bpm design by doing lightning talk
ITD Systems
Spring Boot
Spring Boot
Eberhard Wolff
Continous integration and delivery for single page applications
Continous integration and delivery for single page applications
Sunil Dalal
Releasing High Quality Packages - Longhorn PHP 2021
Releasing High Quality Packages - Longhorn PHP 2021
Colin O'Dell
Validating latest changes with XCI
Validating latest changes with XCI
Victor Morales
Practical Continuous Deployment - Atlassian - London AUG 18 Feb 2014
Practical Continuous Deployment - Atlassian - London AUG 18 Feb 2014
Matthew Cobby
How to contribute to an open source project and dont die during the Code Rev...
How to contribute to an open source project and dont die during the Code Rev...
Victor Morales
Web presentation
Web presentation
Solaiman Hossain Tuhin
Selenium
Selenium
Bryan Mikaelian
What I Learned From Writing a Test Framework (And Why I May Never Write One A...
What I Learned From Writing a Test Framework (And Why I May Never Write One A...
Daryl Walleck
Legacy Sins
Legacy Sins
Eberhard Wolff
KYSUC - Keep Your Schema Under Control
KYSUC - Keep Your Schema Under Control
Coimbra JUG
Jenkins Reviewbot
Jenkins Reviewbot
Yardena Meymann
You Were Lied To About Optimization
You Were Lied To About Optimization
Chris Tankersley
Speed up your regression and reduce cost load with Selenoid + K8s + ReportPortal
Speed up your regression and reduce cost load with Selenoid + K8s + ReportPortal
Danylo Kuvshynov
Maven - Taming the Beast
Maven - Taming the Beast
Roberto Cortez
Continuous Delivery - Devoxx Morocco 2016
Continuous Delivery - Devoxx Morocco 2016
Rafa Leszko
Continuous Delivery - Voxxed Days Thessaloniki 21.10.2016
Continuous Delivery - Voxxed Days Thessaloniki 21.10.2016
Rafa Leszko
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium Framework
Oleksiy Rezchykov
DotNext 2017 in Moscow - Challenges of Managing CoreFX repo -- Karel Zikmund
DotNext 2017 in Moscow - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
Overview of Java EE
Overview of Java EE
Kohei Nozaki
Continuous delivery of your legacy application
Continuous delivery of your legacy application
ColdFusionConference
Software Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill Sparks
Phill Sparks
How to work with Selenium Grid: a quick walkthrough
How to work with Selenium Grid: a quick walkthrough
Noam Zakai
Continuous integration & deployment
Continuous integration & deployment
Alan Harper
How to Supercharge your PHP Web API
How to Supercharge your PHP Web API
Aurimas Niekis
Content Modeling Behavior
Content Modeling Behavior
Alfresco Software
Webscripts
Webscripts
Alfresco Software

More Related Content

What's hot (20)

How to contribute to an open source project and dont die during the Code Rev...
How to contribute to an open source project and dont die during the Code Rev...
Victor Morales
Web presentation
Web presentation
Solaiman Hossain Tuhin
Selenium
Selenium
Bryan Mikaelian
What I Learned From Writing a Test Framework (And Why I May Never Write One A...
What I Learned From Writing a Test Framework (And Why I May Never Write One A...
Daryl Walleck
Legacy Sins
Legacy Sins
Eberhard Wolff
KYSUC - Keep Your Schema Under Control
KYSUC - Keep Your Schema Under Control
Coimbra JUG
Jenkins Reviewbot
Jenkins Reviewbot
Yardena Meymann
You Were Lied To About Optimization
You Were Lied To About Optimization
Chris Tankersley
Speed up your regression and reduce cost load with Selenoid + K8s + ReportPortal
Speed up your regression and reduce cost load with Selenoid + K8s + ReportPortal
Danylo Kuvshynov
Maven - Taming the Beast
Maven - Taming the Beast
Roberto Cortez
Continuous Delivery - Devoxx Morocco 2016
Continuous Delivery - Devoxx Morocco 2016
Rafa Leszko
Continuous Delivery - Voxxed Days Thessaloniki 21.10.2016
Continuous Delivery - Voxxed Days Thessaloniki 21.10.2016
Rafa Leszko
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium Framework
Oleksiy Rezchykov
DotNext 2017 in Moscow - Challenges of Managing CoreFX repo -- Karel Zikmund
DotNext 2017 in Moscow - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
Overview of Java EE
Overview of Java EE
Kohei Nozaki
Continuous delivery of your legacy application
Continuous delivery of your legacy application
ColdFusionConference
Software Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill Sparks
Phill Sparks
How to work with Selenium Grid: a quick walkthrough
How to work with Selenium Grid: a quick walkthrough
Noam Zakai
Continuous integration & deployment
Continuous integration & deployment
Alan Harper
How to Supercharge your PHP Web API
How to Supercharge your PHP Web API
Aurimas Niekis
How to contribute to an open source project and dont die during the Code Rev...
How to contribute to an open source project and dont die during the Code Rev...
Victor Morales
What I Learned From Writing a Test Framework (And Why I May Never Write One A...
What I Learned From Writing a Test Framework (And Why I May Never Write One A...
Daryl Walleck
KYSUC - Keep Your Schema Under Control
KYSUC - Keep Your Schema Under Control
Coimbra JUG
You Were Lied To About Optimization
You Were Lied To About Optimization
Chris Tankersley
Speed up your regression and reduce cost load with Selenoid + K8s + ReportPortal
Speed up your regression and reduce cost load with Selenoid + K8s + ReportPortal
Danylo Kuvshynov
Maven - Taming the Beast
Maven - Taming the Beast
Roberto Cortez
Continuous Delivery - Devoxx Morocco 2016
Continuous Delivery - Devoxx Morocco 2016
Rafa Leszko
Continuous Delivery - Voxxed Days Thessaloniki 21.10.2016
Continuous Delivery - Voxxed Days Thessaloniki 21.10.2016
Rafa Leszko
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium Framework
Oleksiy Rezchykov
DotNext 2017 in Moscow - Challenges of Managing CoreFX repo -- Karel Zikmund
DotNext 2017 in Moscow - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
Overview of Java EE
Overview of Java EE
Kohei Nozaki
Continuous delivery of your legacy application
Continuous delivery of your legacy application
ColdFusionConference
Software Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill Sparks
Phill Sparks
How to work with Selenium Grid: a quick walkthrough
How to work with Selenium Grid: a quick walkthrough
Noam Zakai
Continuous integration & deployment
Continuous integration & deployment
Alan Harper
How to Supercharge your PHP Web API
How to Supercharge your PHP Web API
Aurimas Niekis

Viewers also liked (6)

Content Modeling Behavior
Content Modeling Behavior
Alfresco Software
Webscripts
Webscripts
Alfresco Software
Project Management with Alfresco
Project Management with Alfresco
ITD Systems
Orgchart for Alfresco lightning talk
Orgchart for Alfresco lightning talk
ITD Systems
Records Management - The Art of Throwing Things Away - Alfresco Software
Records Management - The Art of Throwing Things Away - Alfresco Software
Alfresco Software
Alfresco In An Hour - Document Management, Web Content Management, and Collab...
Alfresco In An Hour - Document Management, Web Content Management, and Collab...
Alfresco Software
Content Modeling Behavior
Content Modeling Behavior
Alfresco Software
Project Management with Alfresco
Project Management with Alfresco
ITD Systems
Orgchart for Alfresco lightning talk
Orgchart for Alfresco lightning talk
ITD Systems
Records Management - The Art of Throwing Things Away - Alfresco Software
Records Management - The Art of Throwing Things Away - Alfresco Software
Alfresco Software
Alfresco In An Hour - Document Management, Web Content Management, and Collab...
Alfresco In An Hour - Document Management, Web Content Management, and Collab...
Alfresco Software
Ad

More from ITD Systems (7)

Overcoming common knowledge: 100k nodes in a single folder
Overcoming common knowledge: 100k nodes in a single folder
ITD Systems
Data Spider for Legacy Infrastructure: Capturing content from multiple file s...
Data Spider for Legacy Infrastructure: Capturing content from multiple file s...
ITD Systems
亳仄亠舒仆亳 从 亟亠仄仂
亳仄亠舒仆亳 从 亟亠仄仂
ITD Systems
Special Notes for the Alvex Demo
Special Notes for the Alvex Demo
ITD Systems
PM Innovation 2013 - 丕仗舒于仍亠仆亳亠 仆亠仗亠亟从舒亰亠仄仄 仗仂亠从仂仄
PM Innovation 2013 - 丕仗舒于仍亠仆亳亠 仆亠仗亠亟从舒亰亠仄仄 仗仂亠从仂仄
ITD Systems
Alvex. Become a partner
Alvex. Become a partner
ITD Systems
舒从亳亶 仂弍亰仂 于仂亰仄仂亢仆仂亠亶 Alfresco 亳 Alvex
舒从亳亶 仂弍亰仂 于仂亰仄仂亢仆仂亠亶 Alfresco 亳 Alvex
ITD Systems
Overcoming common knowledge: 100k nodes in a single folder
Overcoming common knowledge: 100k nodes in a single folder
ITD Systems
Data Spider for Legacy Infrastructure: Capturing content from multiple file s...
Data Spider for Legacy Infrastructure: Capturing content from multiple file s...
ITD Systems
亳仄亠舒仆亳 从 亟亠仄仂
亳仄亠舒仆亳 从 亟亠仄仂
ITD Systems
Special Notes for the Alvex Demo
Special Notes for the Alvex Demo
ITD Systems
PM Innovation 2013 - 丕仗舒于仍亠仆亳亠 仆亠仗亠亟从舒亰亠仄仄 仗仂亠从仂仄
PM Innovation 2013 - 丕仗舒于仍亠仆亳亠 仆亠仗亠亟从舒亰亠仄仄 仗仂亠从仂仄
ITD Systems
Alvex. Become a partner
Alvex. Become a partner
ITD Systems
舒从亳亶 仂弍亰仂 于仂亰仄仂亢仆仂亠亶 Alfresco 亳 Alvex
舒从亳亶 仂弍亰仂 于仂亰仄仂亢仆仂亠亶 Alfresco 亳 Alvex
ITD Systems
Ad

Recently uploaded (20)

Curietech AI in action - Accelerate MuleSoft development
Curietech AI in action - Accelerate MuleSoft development
shyamraj55
Wenn alles versagt - IBM Tape sch端tzt, was z辰hlt! Und besonders mit dem neust...
Wenn alles versagt - IBM Tape sch端tzt, was z辰hlt! Und besonders mit dem neust...
Josef Weingand
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
Mastering AI Workflows with FME by Mark Doring
Mastering AI Workflows with FME by Mark Doring
Safe Software
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Priyanka Aash
OWASP Barcelona 2025 Threat Model Library
OWASP Barcelona 2025 Threat Model Library
PetraVukmirovic
10 Key Challenges for AI within the EU Data Protection Framework.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
digitaljignect
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
Quantum AI: Where Impossible Becomes Probable
Quantum AI: Where Impossible Becomes Probable
Saikat Basu
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
Securing AI - There Is No Try, Only Do!.pdf
Securing AI - There Is No Try, Only Do!.pdf
Priyanka Aash
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Priyanka Aash
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
AI VIDEO MAGAZINE - June 2025 - r/aivideo
AI VIDEO MAGAZINE - June 2025 - r/aivideo
1pcity Studios, Inc
"Scaling in space and time with Temporal", Andriy Lupa.pdf
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
MPU+: A Transformative Solution for Next-Gen AI at the Edge, a Presentation...
MPU+: A Transformative Solution for Next-Gen AI at the Edge, a Presentation...
Edge AI and Vision Alliance
Lessons Learned from Developing Secure AI Workflows.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Priyanka Aash
Curietech AI in action - Accelerate MuleSoft development
Curietech AI in action - Accelerate MuleSoft development
shyamraj55
Wenn alles versagt - IBM Tape sch端tzt, was z辰hlt! Und besonders mit dem neust...
Wenn alles versagt - IBM Tape sch端tzt, was z辰hlt! Und besonders mit dem neust...
Josef Weingand
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
Mastering AI Workflows with FME by Mark Doring
Mastering AI Workflows with FME by Mark Doring
Safe Software
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Priyanka Aash
OWASP Barcelona 2025 Threat Model Library
OWASP Barcelona 2025 Threat Model Library
PetraVukmirovic
10 Key Challenges for AI within the EU Data Protection Framework.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
digitaljignect
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
Quantum AI: Where Impossible Becomes Probable
Quantum AI: Where Impossible Becomes Probable
Saikat Basu
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
Securing AI - There Is No Try, Only Do!.pdf
Securing AI - There Is No Try, Only Do!.pdf
Priyanka Aash
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Priyanka Aash
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
AI VIDEO MAGAZINE - June 2025 - r/aivideo
AI VIDEO MAGAZINE - June 2025 - r/aivideo
1pcity Studios, Inc
"Scaling in space and time with Temporal", Andriy Lupa.pdf
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
MPU+: A Transformative Solution for Next-Gen AI at the Edge, a Presentation...
MPU+: A Transformative Solution for Next-Gen AI at the Edge, a Presentation...
Edge AI and Vision Alliance
Lessons Learned from Developing Secure AI Workflows.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Priyanka Aash

Testing Alfresco extensions