SlideShare a Scribd company logo
1 of 36
Download to read offline
EXTENSIONS, WHICH YOU HAVE TO TAKE WITH YOU TO A
DESERTED ISLAND
Michał Matłoka / @mmatloka
ABOUT ME
EXAMPLE SITUATION
Company with traditions
JPA
JSF
No tests

Kajtek
JBOSS ARQUILLIAN
Manages the lifecycle of the container (or containers)
Deploys archive (or archives) to the container (or
containers)
Executes the tests inside (or against) the container
Captures the results and returnes them to the test runner
for reporting
CONTAINER ADAPTERS
JBoss AS/WildFly
GlassFish
WebLogic
WebSphere
Jetty
Tomcat
OSGi
Resin
OpenShift
Cloudbees
...
CONTAINER TYPES
Embedded
Managed
Remote
JBOSS ARQUILLIAN
@uWt(rulincas
RnihAqila.ls)
pbi casSmTs {
ulc ls oeet
@elyet
Dpomn
pbi sai Acie? cetDpomn( {rtr ..}
ulc ttc rhv<> raeelyet)
eun .
@net
Ijc
piaeSmtigsmtig
rvt oehn oehn;
@et
Ts
pbi vi sol.( {
ulc od hud.)
..
.
}
}
SHRINKWRAP
Bundle the dependent classes and resources into an archive
Wbrhv wbrhv =SrnWa.raeWbrhv.ls)
eAcie eAcie
hikrpcet(eAciecas
.dCasUe.ls)
adls(srcas
.dAMnfsRsuc(mtAstISAC,"en.m";
adsaieteoreEpyse.NTNE basxl)
Wbrhv wbrhv =SrnWa.raeWbrhv.ls)
eAcie eAcie
hikrpcet(eAciecas
.dCassUe.ls,..
adlse(srcas .)
.dAMnfsRsuc(mtAstISAC,"en.m";
adsaieteoreEpyse.NTNE basxl)
Wbrhv wbrhv =SrnWa.raeWbrhv.ls)
eAcie eAcie
hikrpcet(eAciecas
.dPcaeUe.ls.ePcae)
adakg(srcasgtakg()
.dAMnfsRsuc(mtAstISAC,"en.m";
adsaieteoreEpyse.NTNE basxl)
SHRINKWRAP RESOLVER
Fl[ fls=Mvnrsle(
ie] ie
ae.eovr)
.eov(GAV)
rsle"::"
.ihrniiiy)
wtTastvt(
.sie)
aFl(;
Fl[ fls=Mvnrsle(
ie] ie
ae.eovr)
.odoFoFl(/aht/o.m"
laPmrmie"pt/opmxl)
.eov(GA)
rsle":"
.ihrniiiy)
wtTastvt(
.sie)
aFl(;
Fl[ fls=Mvnrsle(
ie] ie
ae.eovr)
.odoFoFl(/aht/o.m"
laPmrmie"pt/opmxl)
.motutmDpnece(
iprRnieeednis)
.eov(.ihrniiiy)
rsle)wtTastvt(
.sie)
aFl(;
Wbrhv wbrhv =SrnWa.raeMvnmotrcas
eAcie eAcie
hikrpcet(aeIpre.ls)
.odoFoFl(/aht/o.m"
laPmrmie"pt/opmxl)
.motulOtu(
iprBidupt)
.sWbrhv.ls)
a(eAciecas;
Wbrhv wbrhv =SrnWa
eAcie eAcie
hikrp
.raeEbdeGalIpre.ls)
cet(meddrdemotrcas
.oPoetietr(i)
frrjcDrcoydr
.motulOtu(
iprBidupt)
.sWbrhv.ls)
a(eAciecas;
SHRINKWRAP DESCRIPTORS
The goal is to provide most of the Java EE
deployment descriptors. Each descriptor
follows the same API style and allows to
manipulate all elements as the specification
describes.
SHRINKWRAP DESCRIPTORS - PERSISTENCE.XML

<essec>
pritne
<essec-ntnm=map>
pritneui ae"yp"
<rvdroghbraeebHbraeessec<poie>
poie>r.ient.j.ientPritne/rvdr
<t-aasuc>aa/ealD<jadt-ore
jadt-orejv:DfutS/t-aasuc>
<rpris
poete>
<rprynm=hbraedaet vle"r.ient.ilc.SLilc
poet ae"ient.ilc" au=oghbraedaetHQDae
<rprynm=hbraehmdlat"vle"raedo"
poet ae"ient.b2d.uo au=cet-rp>
<poet>/rpry<poete>
/rpry<poet>/rpris
<pritneui>
/essec-nt
<pritne
/essec>
SHRINKWRAP DESCRIPTORS - CODE
fnlPritneecitrpritne=Dsrpos
ia essecDsrpo essec
ecitr
.raePritneecitrcas
cet(essecDsrpo.ls)
.raeessecUi(
cetPritnent)
.ae"yp"
nm(map)
.rvdr"r.ient.j.ientPritne)
poie(oghbraeebHbraeessec"
.tDtSuc(jv:DfutS)
jaaaore"aa/ealD"
.eOCetPoete(
gtrraerpris)
.raerpry)nm(hbraedaet)
cetPoet(.ae"ient.ilc"
.au(oghbraedaetHQDaet)u(
vle"r.ient.ilc.SLilc".p)
.raerpry)nm(hbraehmdlat"
cetPoet(.ae"ient.b2d.uo)
.au(cet-rp)u(
vle"raedo".p)
.p)u(
u(.p)
ARQUILLIAN PERSISTENCE EXTENSION
Wrapping each test in the seperated transaction
Database seeding using: DBUnit (XML, XLS, YAML, JSON),
SQL scripts
DB state comparing with dataset at the end of the test
Eviction JPA second level cache between test method
invocation
ARQUILLIAN PERSISTENCE EXTENSION - EXAMPLE PART I
@et
Ts
@snDtSt"aaesuesyl)
Uigaae(dtst/sr.m"
@hudacDtSt"aaesepce-sr.m"
SolMthaae(dtst/xetduesyl)
pbi vi solCagUePswr( trw Ecpin{
ulc od hudhnesrasod) hos xeto
/ gvn
/ ie
fnlSrn epcePswr ="uiPak"
ia tig xetdasod
lbelci;
fnlUe ue =e.idUe.ls,2)
ia sr sr
mfn(srcas L;
/ we
/ hn
ue.ePswr(xetdasod;
srstasodepcePswr)
e.eg(sr;
mmreue)
/ te
/ hn
asrTa(srgtasod).sqaT(xetdasod;
sethtue.ePswr()iEuloepcePswr)
}
ARQUILLIAN PERSISTENCE EXTENSION - EXAMPLE PART II
ue:
sr
-i:1
d
frtae Jh
isnm: on
lsnm:Sih
atae mt
uenm:dod
srae ove
pswr:pswr
asod asod
-i:2
d
frtae Cak
isnm: lr
lsnm:Kn
atae et
uenm:spra
srae uemn
pswr:kytnt
asod rpoie
ARQUILLIAN DRONE
Integrates WebDriver with Arquillian
Interaction with deployments and containers provided by
Arquillian
Configuration kept in arquillian.xml
Compatible with WebDriver (Selenium 2), Selenium 1 and
Selenium Grids
ARQUILLIAN DRONE - EXAMPLE
@uWt(rulincas
RnihAqila.ls)
pbi casWbrvret{
ulc ls eDieTs
@elyettsal =fle
Dpomn(etbe
as)
pbi sai Wbrhv cetDpomn( ..
ulc ttc eAcie raeelyet) .
@rulineore
AqilaRsuc
ULcnetah
R otxPt;
@rn
Doe
Wbrvrdie;
eDie rvr
@et
Ts
pbi vi solNtoi( {
ulc od hudoLgn)
die.idlmn(yi(lgnomlgn).lc(;
rvrfnEeetB.d"oiFr:oi")cik)
..
.
}
}
ARQUILLIAN GRAPHENE
Extensions for WebDriver
PageObjects and PageFragments
AJAX support
ARQUILLIAN GRAPHENE - EXAMPLE PART I
@uWt(rulincas
RnihAqila.ls)
pbi casTsLgn{
ulc ls etoi
@rn
Doe
Wbrvrbosr
eDie rwe;
@ae
Pg
HmPg hmPg;
oeae oeae
@etepcs=Lgnaldxeto.ls)
Ts(xet
oiFieEcpincas
pbi vi tsLgnald){
ulc od etoiFie( }
hmPg.oi(nneitn" "sr)
oeaelgn"o-xset, ue";
}
}
ARQUILLIAN GRAPHENE - EXAMPLE PART II
pbi casHmPg {
ulc ls oeae
@idy"lgnfr"
FnB(.oi-om)
Lgnilglgnilg
oiDao oiDao;
@idy"sac"
FnB(.erh)
AtcmltCmoetfltxSac;
uoopeeopnn uleterh
pbi vi lgnSrn ue,Srn pswr)trw Lgnaldxeto {
ulc od oi(tig sr tig asod hos oiFieEcpin
lgnilgstsrue)
oiDao.eUe(sr;
lgnilgstasodpswr)
oiDao.ePswr(asod;
lgnilglgn)
oiDao.oi(;
}
..
.
}
ARQUILLIAN GRAPHENE - EXAMPLE PART III
pbi casLgnilg{
ulc ls oiDao
@idy
FnB
piaeWblmn ueNm;
rvt eEeet srae
@idyi ="oi"
FnB(d
lgn)
piaeWblmn lgnutn
rvt eEeet oiBto;
..
..
}
ARQUILLIAN GRAPHENE - AJAX
Gahn.atjx)utl)eeetwblmnOB)i(.
rpeewiAa(.ni(.lmn(eEeetry.s)
.s)nt)peet)
i(.o(.rsn(;
.nbe(;
eald)
.eetd)
slce(;
.iil(;
vsbe)
ARQUILLIAN WARP
Using Warp, you can initiate an HTTP request
using a client-side testing tool such as
WebDriver and, in the same request cycle,
execute in-container server-side tests
ARQUILLIAN WARP
Includes support for
JSF
JAX-RS (REST)
Spring MVC
ARQUILLIAN WARP - EXAMPLE PART I
@uWt(rulincas
RnihAqila.ls)
@apet
WrTs
@uACin
Rnslet
pbi casBscet{
ulc ls aiTs
@elyet
Dpomn
..
.
@rulineore
AqilaRsuc
ULcnetah
R otxPt;
@et
Ts
pbi vi sol..){
ulc od hud.(
Wr
ap
.ntaeAtvt)
iiit(ciiy
.bev(bevr
osreOsre)
.npc(npcin;
isetIseto)
}
}
ARQUILLIAN WARP - EXAMPLE PART II
@et
Ts
pbi vi solMkPoeRqet){
ulc od hudaerpreus(
Wr.ntaenwAtvt( {
apiiit(e ciiy)
@vrie
Oerd
pbi vi prom){
ulc od efr(
bosrnvgt(.ocnetah+"cr";
rwe.aiae)t(otxPt
/at)
}
}.ru(.bev(eus(.r(.nsih"cr")
)gop)osrerqet)ui)edWt(/at)
.npc(npcin;
isetiseto)
}
ARQUILLIAN WARP REST - EXAMPLEPART III - REST
Iseto iseto =nwIseto( {
npcin npcin
e npcin)
piaesai fnlln sraVrinI =1;
rvt ttc ia og eilesoUD
L
@rulineore
AqilaRsuc
piaeRsCnetrsCnet
rvt etotx etotx;

@feSrlt
Atreve
pbi vi tsGttcs){
ulc od eteSok(
asrTa(etotx.eHtRqet)gtehd).sqaT(tpehdGT;
sethtrsCnetgttpeus(.eMto()iEuloHtMto.E)
asrTa(etotx.eHtRsos(.eSauCd()iEuloRsos.t
sethtrsCnetgttpepne)gtttsoe).sqaT(epneSa
asrTa(etotx.eHtRsos(.eCnetye).sqaT(apiai
sethtrsCnetgttpepne)gtotnTp()iEulo"plcto
Ls ls =(it rsCnetgttpepne)gtniy)
it it
Ls) etotx.eHtRsos(.eEtt(;
asrTa(itsz()iEulo1;
sethtls.ie).sqaT()
}
}
ARQUILLIAN DROIDIUM
Includes container adapter
Device and emulator management
Can create AVD (Android Virtual Device)
Arquillian Droidium Web - Selenium integration
Arquillian Droidium Native - Selendroid integration
Can take screeshots
Early Alpha
ARQUILLIAN DROIDIUM - EXAMPLE
@uWt(rulincas
RnihAqila.ls)
@uACin
Rnslet
pbi casDoduWbetae{
ulc ls riimeTsCs
@elyet
Dpomn
@agtCnanr"bsa"
Tresotie(joss)
pbi sai Acie? gtelyet){
ulc ttc rhv<> eDpomn(
rtr SrnWa
eun hikrp
.raermiFl(eAciecas nwFl(so.a")
cetFoZpieWbrhv.ls, e ie"hpwr);
}
@et
Ts
@prtODpomn(joss)
Oeaenelyet"bsa"
pbi vi ts0(DoeAdodrvrdie,
ulc od et1@rn nriDie rvr
@rulineoreULdpomnUL {
AqilaRsuc R elyetR) L
die.e(elyetR.otig);
rvrgtdpomnULtSrn()
asrTu(rvrgtaeore)cnan(So")
setredie.ePgSuc(.otis"hp);
}
}
ARQUILLIAN DROIDIUM - EXAMPLE
@uWt(rulincas
RnihAqila.ls)
@uACin
Rnslet
pbi casDoduSlnriTsCs {
ulc ls riimeedodetae
@elyet
Dpomn
@ntuetbe
Isrmnal
pbi sai Acie? gtelyet){
ulc ttc rhv<> eDpomn(
rtr SrnWa
eun hikrp
.raermiFl(aarhv.ls,nwFl(so.p")
cetFoZpieJvAciecas e ie"hpak);
}
@et
Ts
pbi vi eape@rulineoreAdodeieadod
ulc od xml(AqilaRsuc nriDvc nri,
@rn Wbrvrdie){
Doe eDie rvr
adodgtciiyaaePoie(.eAtvtMngr)
nri.eAtvtMngrrvdr)gtciiyaae(
.trAtvt(cmso.oecenciiy)
satciiy"o.hpHmSreAtvt"
Wblmn bto =die
eEeet utn
rvr
.idlmn(yi(crBto")
fnEeetB.d"atutn);
.. }
.
}
ARQUILLIAN PERFORMANCE - EXAMPLE
@efracTs(eutTrsod2
Promneetrslshehl=)
/ cek i rslshehl *nwie<odie
/ hcs f eutTrsod
eTm
lTm
@uWt(rulincas
RnihAqila.ls)
pbi casRcmedtoBidnTs {
ulc ls eomnainuliget
@elyet
Dpomn
pbi sai JvAciecetDpomn( {
ulc ttc aarhv raeelyet)
rtr ..
eun .
}
@netRcmedtoSriercmedtoSrie
Ijc eomnainevc eomnainevc;
@et
Ts
@efrac(ie2)/ tmoti m
Promnetm=0 / ieu n s
pbi vi dHrWr( trw Ecpin{
ulc od oadok) hos xeto
..
.
}
}
OTHER EXTENSIONS
Extension Byteman
Google Guice Extension
GWT Testing extension
Extension Jacoco
Extension JRebel
screenRecorder
Spring Framework Extension
arquillian-ios-aggregator
arquillian-extension-qunit
Spock Arquillian Extension
ShrinkWrap DSL
TAKE AWAYS
ShrinkWrap - archives
ShrinkWrap Resolver - maven, gradle
ShrinkWrap Descriptors - fluent API code generation from
XSD
Arquillian Persistence Extension - DB
Arquillian Drone - WebDriver integration - UI
Arquillian Graphene - extended WebDriver - better UI
Arquillian Warp - client-side request, server-side test REST, Spring MVC...
Arquillian Droidium - Android Browser, Android UI
Arquillian Performance - timeouts, execution time
comparision
MATERIALS & HELP
http://arquillian.org
http://arquillian.org/guides/
https://docs.jboss.org/author/display/ARQ/Reference+Guide
https://github.com/arquillian/
https://github.com/shrinkwrap/
https://community.jboss.org/
http://jira.jboss.org/
irc.freenode.net - #arquillian, #jbosstesting
http://meninblack.wikia.com/
THE END
QUESTIONS?

mmatloka @ gmail.com
https://github.com/mmatloka/presentations

More Related Content

Similar to Arquillian Extensions

Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scriptingTony Fabeen
 
SecureSocial - Authentication for Play Framework
SecureSocial - Authentication for Play FrameworkSecureSocial - Authentication for Play Framework
SecureSocial - Authentication for Play Frameworkjaliss
 
Microservices With Spring Boot and Spring Cloud Netflix
Microservices With Spring Boot and Spring Cloud NetflixMicroservices With Spring Boot and Spring Cloud Netflix
Microservices With Spring Boot and Spring Cloud NetflixKrzysztof Sobkowiak
 
An Introduction to CSS Preprocessors
An Introduction to CSS PreprocessorsAn Introduction to CSS Preprocessors
An Introduction to CSS PreprocessorsMiloš Sutanovac
 
C* Summit EU 2013: The State of CQL
C* Summit EU 2013: The State of CQLC* Summit EU 2013: The State of CQL
C* Summit EU 2013: The State of CQLDataStax Academy
 
Refactoring to symfony components
Refactoring to symfony componentsRefactoring to symfony components
Refactoring to symfony componentsMichael Peacock
 
GeeCON 2013 - EJB application guided by tests
GeeCON 2013 - EJB application guided by testsGeeCON 2013 - EJB application guided by tests
GeeCON 2013 - EJB application guided by testsJakub Marchwicki
 
Creating windows store java script apps
Creating windows store java script appsCreating windows store java script apps
Creating windows store java script appsEugene Zharkov
 
20110114 Next Generation Sequencing Course
20110114 Next Generation Sequencing Course20110114 Next Generation Sequencing Course
20110114 Next Generation Sequencing CoursePierre Lindenbaum
 
Automated tests - facts and myths
Automated tests - facts and mythsAutomated tests - facts and myths
Automated tests - facts and mythsWojciech Sznapka
 
JavaScript Design Patterns
JavaScript Design PatternsJavaScript Design Patterns
JavaScript Design PatternsDerek Brown
 
Jersey framework
Jersey frameworkJersey framework
Jersey frameworkknight1128
 
Beginner workshop to angularjs presentation at Google
Beginner workshop to angularjs presentation at GoogleBeginner workshop to angularjs presentation at Google
Beginner workshop to angularjs presentation at GoogleAri Lerner
 
jQuery Mobile & PhoneGap
jQuery Mobile & PhoneGapjQuery Mobile & PhoneGap
jQuery Mobile & PhoneGapSwiip
 
nescala 2013
nescala 2013nescala 2013
nescala 2013Hung Lin
 
Presenting Seq for Node.js
Presenting Seq for Node.jsPresenting Seq for Node.js
Presenting Seq for Node.jsDouglas Muth
 

Similar to Arquillian Extensions (20)

Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scripting
 
SecureSocial - Authentication for Play Framework
SecureSocial - Authentication for Play FrameworkSecureSocial - Authentication for Play Framework
SecureSocial - Authentication for Play Framework
 
Microservices With Spring Boot and Spring Cloud Netflix
Microservices With Spring Boot and Spring Cloud NetflixMicroservices With Spring Boot and Spring Cloud Netflix
Microservices With Spring Boot and Spring Cloud Netflix
 
Javascript: The Important Bits
Javascript: The Important BitsJavascript: The Important Bits
Javascript: The Important Bits
 
Advancedservletsjsp
AdvancedservletsjspAdvancedservletsjsp
Advancedservletsjsp
 
An Introduction to CSS Preprocessors
An Introduction to CSS PreprocessorsAn Introduction to CSS Preprocessors
An Introduction to CSS Preprocessors
 
C* Summit EU 2013: The State of CQL
C* Summit EU 2013: The State of CQLC* Summit EU 2013: The State of CQL
C* Summit EU 2013: The State of CQL
 
Refactoring to symfony components
Refactoring to symfony componentsRefactoring to symfony components
Refactoring to symfony components
 
GeeCON 2013 - EJB application guided by tests
GeeCON 2013 - EJB application guided by testsGeeCON 2013 - EJB application guided by tests
GeeCON 2013 - EJB application guided by tests
 
Creating windows store java script apps
Creating windows store java script appsCreating windows store java script apps
Creating windows store java script apps
 
OOP in Rust
OOP in RustOOP in Rust
OOP in Rust
 
20110114 Next Generation Sequencing Course
20110114 Next Generation Sequencing Course20110114 Next Generation Sequencing Course
20110114 Next Generation Sequencing Course
 
Automated tests - facts and myths
Automated tests - facts and mythsAutomated tests - facts and myths
Automated tests - facts and myths
 
JavaScript Design Patterns
JavaScript Design PatternsJavaScript Design Patterns
JavaScript Design Patterns
 
Jersey framework
Jersey frameworkJersey framework
Jersey framework
 
Beginner workshop to angularjs presentation at Google
Beginner workshop to angularjs presentation at GoogleBeginner workshop to angularjs presentation at Google
Beginner workshop to angularjs presentation at Google
 
java_notes.pdf
java_notes.pdfjava_notes.pdf
java_notes.pdf
 
jQuery Mobile & PhoneGap
jQuery Mobile & PhoneGapjQuery Mobile & PhoneGap
jQuery Mobile & PhoneGap
 
nescala 2013
nescala 2013nescala 2013
nescala 2013
 
Presenting Seq for Node.js
Presenting Seq for Node.jsPresenting Seq for Node.js
Presenting Seq for Node.js
 

Recently uploaded

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Recently uploaded (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

Arquillian Extensions

  • 1. EXTENSIONS, WHICH YOU HAVE TO TAKE WITH YOU TO A DESERTED ISLAND Michał Matłoka / @mmatloka
  • 3. EXAMPLE SITUATION Company with traditions JPA JSF No tests Kajtek
  • 4. JBOSS ARQUILLIAN Manages the lifecycle of the container (or containers) Deploys archive (or archives) to the container (or containers) Executes the tests inside (or against) the container Captures the results and returnes them to the test runner for reporting
  • 7. JBOSS ARQUILLIAN @uWt(rulincas RnihAqila.ls) pbi casSmTs { ulc ls oeet @elyet Dpomn pbi sai Acie? cetDpomn( {rtr ..} ulc ttc rhv<> raeelyet) eun . @net Ijc piaeSmtigsmtig rvt oehn oehn; @et Ts pbi vi sol.( { ulc od hud.) .. . } }
  • 8. SHRINKWRAP Bundle the dependent classes and resources into an archive Wbrhv wbrhv =SrnWa.raeWbrhv.ls) eAcie eAcie hikrpcet(eAciecas .dCasUe.ls) adls(srcas .dAMnfsRsuc(mtAstISAC,"en.m"; adsaieteoreEpyse.NTNE basxl) Wbrhv wbrhv =SrnWa.raeWbrhv.ls) eAcie eAcie hikrpcet(eAciecas .dCassUe.ls,.. adlse(srcas .) .dAMnfsRsuc(mtAstISAC,"en.m"; adsaieteoreEpyse.NTNE basxl) Wbrhv wbrhv =SrnWa.raeWbrhv.ls) eAcie eAcie hikrpcet(eAciecas .dPcaeUe.ls.ePcae) adakg(srcasgtakg() .dAMnfsRsuc(mtAstISAC,"en.m"; adsaieteoreEpyse.NTNE basxl)
  • 9. SHRINKWRAP RESOLVER Fl[ fls=Mvnrsle( ie] ie ae.eovr) .eov(GAV) rsle"::" .ihrniiiy) wtTastvt( .sie) aFl(; Fl[ fls=Mvnrsle( ie] ie ae.eovr) .odoFoFl(/aht/o.m" laPmrmie"pt/opmxl) .eov(GA) rsle":" .ihrniiiy) wtTastvt( .sie) aFl(; Fl[ fls=Mvnrsle( ie] ie ae.eovr) .odoFoFl(/aht/o.m" laPmrmie"pt/opmxl) .motutmDpnece( iprRnieeednis) .eov(.ihrniiiy) rsle)wtTastvt( .sie) aFl(; Wbrhv wbrhv =SrnWa.raeMvnmotrcas eAcie eAcie hikrpcet(aeIpre.ls) .odoFoFl(/aht/o.m" laPmrmie"pt/opmxl) .motulOtu( iprBidupt) .sWbrhv.ls) a(eAciecas; Wbrhv wbrhv =SrnWa eAcie eAcie hikrp .raeEbdeGalIpre.ls) cet(meddrdemotrcas .oPoetietr(i) frrjcDrcoydr .motulOtu( iprBidupt) .sWbrhv.ls) a(eAciecas;
  • 10. SHRINKWRAP DESCRIPTORS The goal is to provide most of the Java EE deployment descriptors. Each descriptor follows the same API style and allows to manipulate all elements as the specification describes.
  • 11. SHRINKWRAP DESCRIPTORS - PERSISTENCE.XML <essec> pritne <essec-ntnm=map> pritneui ae"yp" <rvdroghbraeebHbraeessec<poie> poie>r.ient.j.ientPritne/rvdr <t-aasuc>aa/ealD<jadt-ore jadt-orejv:DfutS/t-aasuc> <rpris poete> <rprynm=hbraedaet vle"r.ient.ilc.SLilc poet ae"ient.ilc" au=oghbraedaetHQDae <rprynm=hbraehmdlat"vle"raedo" poet ae"ient.b2d.uo au=cet-rp> <poet>/rpry<poete> /rpry<poet>/rpris <pritneui> /essec-nt <pritne /essec>
  • 12. SHRINKWRAP DESCRIPTORS - CODE fnlPritneecitrpritne=Dsrpos ia essecDsrpo essec ecitr .raePritneecitrcas cet(essecDsrpo.ls) .raeessecUi( cetPritnent) .ae"yp" nm(map) .rvdr"r.ient.j.ientPritne) poie(oghbraeebHbraeessec" .tDtSuc(jv:DfutS) jaaaore"aa/ealD" .eOCetPoete( gtrraerpris) .raerpry)nm(hbraedaet) cetPoet(.ae"ient.ilc" .au(oghbraedaetHQDaet)u( vle"r.ient.ilc.SLilc".p) .raerpry)nm(hbraehmdlat" cetPoet(.ae"ient.b2d.uo) .au(cet-rp)u( vle"raedo".p) .p)u( u(.p)
  • 13. ARQUILLIAN PERSISTENCE EXTENSION Wrapping each test in the seperated transaction Database seeding using: DBUnit (XML, XLS, YAML, JSON), SQL scripts DB state comparing with dataset at the end of the test Eviction JPA second level cache between test method invocation
  • 14. ARQUILLIAN PERSISTENCE EXTENSION - EXAMPLE PART I @et Ts @snDtSt"aaesuesyl) Uigaae(dtst/sr.m" @hudacDtSt"aaesepce-sr.m" SolMthaae(dtst/xetduesyl) pbi vi solCagUePswr( trw Ecpin{ ulc od hudhnesrasod) hos xeto / gvn / ie fnlSrn epcePswr ="uiPak" ia tig xetdasod lbelci; fnlUe ue =e.idUe.ls,2) ia sr sr mfn(srcas L; / we / hn ue.ePswr(xetdasod; srstasodepcePswr) e.eg(sr; mmreue) / te / hn asrTa(srgtasod).sqaT(xetdasod; sethtue.ePswr()iEuloepcePswr) }
  • 15. ARQUILLIAN PERSISTENCE EXTENSION - EXAMPLE PART II ue: sr -i:1 d frtae Jh isnm: on lsnm:Sih atae mt uenm:dod srae ove pswr:pswr asod asod -i:2 d frtae Cak isnm: lr lsnm:Kn atae et uenm:spra srae uemn pswr:kytnt asod rpoie
  • 16. ARQUILLIAN DRONE Integrates WebDriver with Arquillian Interaction with deployments and containers provided by Arquillian Configuration kept in arquillian.xml Compatible with WebDriver (Selenium 2), Selenium 1 and Selenium Grids
  • 17. ARQUILLIAN DRONE - EXAMPLE @uWt(rulincas RnihAqila.ls) pbi casWbrvret{ ulc ls eDieTs @elyettsal =fle Dpomn(etbe as) pbi sai Wbrhv cetDpomn( .. ulc ttc eAcie raeelyet) . @rulineore AqilaRsuc ULcnetah R otxPt; @rn Doe Wbrvrdie; eDie rvr @et Ts pbi vi solNtoi( { ulc od hudoLgn) die.idlmn(yi(lgnomlgn).lc(; rvrfnEeetB.d"oiFr:oi")cik) .. . } }
  • 18. ARQUILLIAN GRAPHENE Extensions for WebDriver PageObjects and PageFragments AJAX support
  • 19. ARQUILLIAN GRAPHENE - EXAMPLE PART I @uWt(rulincas RnihAqila.ls) pbi casTsLgn{ ulc ls etoi @rn Doe Wbrvrbosr eDie rwe; @ae Pg HmPg hmPg; oeae oeae @etepcs=Lgnaldxeto.ls) Ts(xet oiFieEcpincas pbi vi tsLgnald){ ulc od etoiFie( } hmPg.oi(nneitn" "sr) oeaelgn"o-xset, ue"; } }
  • 20. ARQUILLIAN GRAPHENE - EXAMPLE PART II pbi casHmPg { ulc ls oeae @idy"lgnfr" FnB(.oi-om) Lgnilglgnilg oiDao oiDao; @idy"sac" FnB(.erh) AtcmltCmoetfltxSac; uoopeeopnn uleterh pbi vi lgnSrn ue,Srn pswr)trw Lgnaldxeto { ulc od oi(tig sr tig asod hos oiFieEcpin lgnilgstsrue) oiDao.eUe(sr; lgnilgstasodpswr) oiDao.ePswr(asod; lgnilglgn) oiDao.oi(; } .. . }
  • 21. ARQUILLIAN GRAPHENE - EXAMPLE PART III pbi casLgnilg{ ulc ls oiDao @idy FnB piaeWblmn ueNm; rvt eEeet srae @idyi ="oi" FnB(d lgn) piaeWblmn lgnutn rvt eEeet oiBto; .. .. }
  • 22. ARQUILLIAN GRAPHENE - AJAX Gahn.atjx)utl)eeetwblmnOB)i(. rpeewiAa(.ni(.lmn(eEeetry.s) .s)nt)peet) i(.o(.rsn(; .nbe(; eald) .eetd) slce(; .iil(; vsbe)
  • 23. ARQUILLIAN WARP Using Warp, you can initiate an HTTP request using a client-side testing tool such as WebDriver and, in the same request cycle, execute in-container server-side tests
  • 24. ARQUILLIAN WARP Includes support for JSF JAX-RS (REST) Spring MVC
  • 25. ARQUILLIAN WARP - EXAMPLE PART I @uWt(rulincas RnihAqila.ls) @apet WrTs @uACin Rnslet pbi casBscet{ ulc ls aiTs @elyet Dpomn .. . @rulineore AqilaRsuc ULcnetah R otxPt; @et Ts pbi vi sol..){ ulc od hud.( Wr ap .ntaeAtvt) iiit(ciiy .bev(bevr osreOsre) .npc(npcin; isetIseto) } }
  • 26. ARQUILLIAN WARP - EXAMPLE PART II @et Ts pbi vi solMkPoeRqet){ ulc od hudaerpreus( Wr.ntaenwAtvt( { apiiit(e ciiy) @vrie Oerd pbi vi prom){ ulc od efr( bosrnvgt(.ocnetah+"cr"; rwe.aiae)t(otxPt /at) } }.ru(.bev(eus(.r(.nsih"cr") )gop)osrerqet)ui)edWt(/at) .npc(npcin; isetiseto) }
  • 27. ARQUILLIAN WARP REST - EXAMPLEPART III - REST Iseto iseto =nwIseto( { npcin npcin e npcin) piaesai fnlln sraVrinI =1; rvt ttc ia og eilesoUD L @rulineore AqilaRsuc piaeRsCnetrsCnet rvt etotx etotx; @feSrlt Atreve pbi vi tsGttcs){ ulc od eteSok( asrTa(etotx.eHtRqet)gtehd).sqaT(tpehdGT; sethtrsCnetgttpeus(.eMto()iEuloHtMto.E) asrTa(etotx.eHtRsos(.eSauCd()iEuloRsos.t sethtrsCnetgttpepne)gtttsoe).sqaT(epneSa asrTa(etotx.eHtRsos(.eCnetye).sqaT(apiai sethtrsCnetgttpepne)gtotnTp()iEulo"plcto Ls ls =(it rsCnetgttpepne)gtniy) it it Ls) etotx.eHtRsos(.eEtt(; asrTa(itsz()iEulo1; sethtls.ie).sqaT() } }
  • 28. ARQUILLIAN DROIDIUM Includes container adapter Device and emulator management Can create AVD (Android Virtual Device) Arquillian Droidium Web - Selenium integration Arquillian Droidium Native - Selendroid integration Can take screeshots Early Alpha
  • 29. ARQUILLIAN DROIDIUM - EXAMPLE @uWt(rulincas RnihAqila.ls) @uACin Rnslet pbi casDoduWbetae{ ulc ls riimeTsCs @elyet Dpomn @agtCnanr"bsa" Tresotie(joss) pbi sai Acie? gtelyet){ ulc ttc rhv<> eDpomn( rtr SrnWa eun hikrp .raermiFl(eAciecas nwFl(so.a") cetFoZpieWbrhv.ls, e ie"hpwr); } @et Ts @prtODpomn(joss) Oeaenelyet"bsa" pbi vi ts0(DoeAdodrvrdie, ulc od et1@rn nriDie rvr @rulineoreULdpomnUL { AqilaRsuc R elyetR) L die.e(elyetR.otig); rvrgtdpomnULtSrn() asrTu(rvrgtaeore)cnan(So") setredie.ePgSuc(.otis"hp); } }
  • 30. ARQUILLIAN DROIDIUM - EXAMPLE @uWt(rulincas RnihAqila.ls) @uACin Rnslet pbi casDoduSlnriTsCs { ulc ls riimeedodetae @elyet Dpomn @ntuetbe Isrmnal pbi sai Acie? gtelyet){ ulc ttc rhv<> eDpomn( rtr SrnWa eun hikrp .raermiFl(aarhv.ls,nwFl(so.p") cetFoZpieJvAciecas e ie"hpak); } @et Ts pbi vi eape@rulineoreAdodeieadod ulc od xml(AqilaRsuc nriDvc nri, @rn Wbrvrdie){ Doe eDie rvr adodgtciiyaaePoie(.eAtvtMngr) nri.eAtvtMngrrvdr)gtciiyaae( .trAtvt(cmso.oecenciiy) satciiy"o.hpHmSreAtvt" Wblmn bto =die eEeet utn rvr .idlmn(yi(crBto") fnEeetB.d"atutn); .. } . }
  • 31. ARQUILLIAN PERFORMANCE - EXAMPLE @efracTs(eutTrsod2 Promneetrslshehl=) / cek i rslshehl *nwie<odie / hcs f eutTrsod eTm lTm @uWt(rulincas RnihAqila.ls) pbi casRcmedtoBidnTs { ulc ls eomnainuliget @elyet Dpomn pbi sai JvAciecetDpomn( { ulc ttc aarhv raeelyet) rtr .. eun . } @netRcmedtoSriercmedtoSrie Ijc eomnainevc eomnainevc; @et Ts @efrac(ie2)/ tmoti m Promnetm=0 / ieu n s pbi vi dHrWr( trw Ecpin{ ulc od oadok) hos xeto .. . } }
  • 32. OTHER EXTENSIONS Extension Byteman Google Guice Extension GWT Testing extension Extension Jacoco Extension JRebel screenRecorder Spring Framework Extension arquillian-ios-aggregator arquillian-extension-qunit Spock Arquillian Extension ShrinkWrap DSL
  • 33. TAKE AWAYS ShrinkWrap - archives ShrinkWrap Resolver - maven, gradle ShrinkWrap Descriptors - fluent API code generation from XSD Arquillian Persistence Extension - DB Arquillian Drone - WebDriver integration - UI Arquillian Graphene - extended WebDriver - better UI Arquillian Warp - client-side request, server-side test REST, Spring MVC... Arquillian Droidium - Android Browser, Android UI Arquillian Performance - timeouts, execution time comparision
  • 36. THE END QUESTIONS? mmatloka @ gmail.com https://github.com/mmatloka/presentations