SlideShare a Scribd company logo
Photo by kc7fys




TEST JIRA PLUGINS SMARTER
          JIRA TestKit
ORIGINAL PROBLEMS

•a lot of functional tests - their execution is really time
 consuming (JIRA CI env uses 60+ remote agents and builds
 still may take hours)

• opaque     test fixtures - tons of XML dumps difficult to maintain

• most
    of time spent by JWebUnit/HtmlUnit/Selenium/
 WebDriver in UI not under test

• JUnit   3.x is 12 years old...
PROBLEM AMPLIFICATION

• With WebDriver    and PageObjects writing functional tests got
 too easy (at least superficially) and the number of them
 exploded

• JIRA
     is now developed by multiple teams and consists of
 bundled plugins built and tested separately, but ... jira-func-tests
 were not easily reusable easily outside JIRA core src tree -
 especially against various JIRA versions.
THE SOLUTION: REST-DRIVEN
TEST FIXTURES AND ASSERTIONS

• order    of magnitude faster than driven by UI

• less   fragile (races, changes in UI)

• clear
     and readable test fixture set-ups (no more opaque XML
 dumps)

• stricter, more   powerful and less fragile assertions
JIRA REST API

• Awesome     (as of JIRA 5.0), but ... still limited

• Almost   non-existent for administrative operations

• Use    whenever you can

• JRJC(JIRA REST Java Client) makes using REST API from Java
 very easy
BACKDOOR

• Unofficial dev-only JIRA REST API providing missing
 functionalities

• Originally   part of JIRA source tree (unavailable for mortals)

• Veryeasy to extend and consume: very lightweight lifecycle, no
 need to care too much about long-term commitments,
 security, ideal shape of representations, HTTP return codes, etc.

• Comes   with *Control classes, which allow to easily do remote
 calls from Java
JIRA TESTKIT

•   Backdoor for the Ecosystem

•   Consists of two parts:

      •   JIRA Plugin deployed only during tests and exposing additional
          REST resources

      •   Java client library talking remotely to JIRA and using these
          additional REST resources

•   We hope promote most useful resources from Backdoor to the
    official JIRA REST API
HOW TO - SETUP
<plugin>
    <groupId>com.atlassian.maven.plugins</groupId>
    <artifactId>maven-jira-plugin</artifactId>
    <configuration>
         <pluginArtifacts>
             <pluginArtifact>
                 <groupId>com.atlassian.jira.tests</groupId>
                 <artifactId>jira-testkit-plugin</artifactId>
                 <version>${testkit.version}</version>
             </pluginArtifact>
         </pluginArtifacts>
    </configuration>
<plugin>
HOWTO - SETUP CONT.

<dependency>
    <groupId>com.atlassian.jira.tests</groupId>
    <artifactId>jira-testkit-client</artifactId>
    <version>${testkit.version}</version>
    <scope>test</scope>
</dependency>
HOWTO - USING IN TEST
public class MyPluginTest extends FuncTestCase {
     @Override
     protected void setUpTest() {
         super.setUpTest();
         Backdoor testKit = new Backdoor(
                new TestKitLocalEnvironmentData());
         testKit.restoreBlankInstance(
                TimeBombLicence.LICENCE_FOR_TESTING);
         testKit.usersAndGroups().addUser("test-user");
         testKit.websudo().disable();
         testKit.subtask().enable();
         // ...
     }

     // ...
 }
public class TestBugzillaImporter extends TestBase {

    private JiraRestClient restClient;

    @Before
    public void setUpTest() {
        backdoor().restoreBlankInstance();
        backdoor().attachments().enable();
        backdoor().timeTracking().enable("8", "5", TimeTracking.Format.PRETTY,
               TimeTracking.Unit.HOUR, TimeTracking.Mode.MODERN);
        restClient = ITUtils.createRestClient(jira().environmentData());
    }

    @Test
    public void someTest() {
        // execute your test using Page Objects / WebDriver
        // ...
        // maybe you need some special license
        assertTrue(backdoor().license().switchToPersonalLicense());
        // ...
       // maybe it should create a user and put it into an appropriate group
        assertTrue(backdoor().usersAndGroups().userExists("mytestuser"));
        assertTrue(backdoor().usersAndGroups().isUserInGroup("mytestuser", "jira-users"));

        // maybe it creates a JIRA issue

        final Issue issue = restClient.getIssueClient().getIssue("TES-19",
               new NullProgressMonitor());
        assertEquals("expectedreporter", issue.getReporter().getName());
        assertEquals("expectedassignee", issue.getAssignee().getName());
    }
}
HOW CAN I USE IT
•   It's hot and bleeding edge, still changing shape (right as I am speaking)

•   https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Smarter
    +integration+testing+with+TestKit

•   https://bitbucket.org/atlassian/jira-testkit/ (planning to open-source it)

•   https://bitbucket.org/atlassian/jira-testkit-example

•   https://marketplace.atlassian.com/plugins/com.atlassian.jira.tests.jira-testkit-
    plugin

•   JIRA Importers Plugin source code (bundled with JIRA src distro)
DON'T USE IN PRODUCTION!

More Related Content

What's hot

Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)
Ryan Cuprak
 
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
Daniel Bryant
 
Why Play Framework is fast
Why Play Framework is fastWhy Play Framework is fast
Why Play Framework is fast
Legacy Typesafe (now Lightbend)
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2a
Ivan Ma
 
JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014
Ryan Cuprak
 
Play! Framework for JavaEE Developers
Play! Framework for JavaEE DevelopersPlay! Framework for JavaEE Developers
Play! Framework for JavaEE Developers
Teng Shiu Huang
 
Play Framework workshop: full stack java web app
Play Framework workshop: full stack java web appPlay Framework workshop: full stack java web app
Play Framework workshop: full stack java web app
Andrew Skiba
 
Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Anton Arhipov
 
Introduction in the play framework
Introduction in the play frameworkIntroduction in the play framework
Introduction in the play framework
Alexander Reelsen
 
Apache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolboxApache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolbox
Antoine Sabot-Durand
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
Trey Howard
 
Apache Lucene for Java EE Developers
Apache Lucene for Java EE DevelopersApache Lucene for Java EE Developers
Apache Lucene for Java EE Developers
Virtual JBoss User Group
 
Java 9 Functionality and Tooling
Java 9 Functionality and ToolingJava 9 Functionality and Tooling
Java 9 Functionality and Tooling
Trisha Gee
 
WebLogic authentication debugging
WebLogic authentication debuggingWebLogic authentication debugging
WebLogic authentication debugging
Maarten Smeets
 
Java EE 8
Java EE 8Java EE 8
Java EE 8
Ryan Cuprak
 
Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]
Ryan Cuprak
 
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
Stephen Chin
 
Real World Java 9
Real World Java 9Real World Java 9
Real World Java 9
J On The Beach
 
Spring Boot
Spring BootSpring Boot
Spring Boot
Jiayun Zhou
 
Java EE 8 Update
Java EE 8 UpdateJava EE 8 Update
Java EE 8 Update
Ryan Cuprak
 

What's hot (20)

Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)
 
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
 
Why Play Framework is fast
Why Play Framework is fastWhy Play Framework is fast
Why Play Framework is fast
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2a
 
JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014
 
Play! Framework for JavaEE Developers
Play! Framework for JavaEE DevelopersPlay! Framework for JavaEE Developers
Play! Framework for JavaEE Developers
 
Play Framework workshop: full stack java web app
Play Framework workshop: full stack java web appPlay Framework workshop: full stack java web app
Play Framework workshop: full stack java web app
 
Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012
 
Introduction in the play framework
Introduction in the play frameworkIntroduction in the play framework
Introduction in the play framework
 
Apache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolboxApache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolbox
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
Apache Lucene for Java EE Developers
Apache Lucene for Java EE DevelopersApache Lucene for Java EE Developers
Apache Lucene for Java EE Developers
 
Java 9 Functionality and Tooling
Java 9 Functionality and ToolingJava 9 Functionality and Tooling
Java 9 Functionality and Tooling
 
WebLogic authentication debugging
WebLogic authentication debuggingWebLogic authentication debugging
WebLogic authentication debugging
 
Java EE 8
Java EE 8Java EE 8
Java EE 8
 
Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]
 
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
 
Real World Java 9
Real World Java 9Real World Java 9
Real World Java 9
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Java EE 8 Update
Java EE 8 UpdateJava EE 8 Update
Java EE 8 Update
 

Viewers also liked

InfoShare 2012 efektywne przeglądy kodu w zespołach agile [Polish]
InfoShare 2012 efektywne przeglądy kodu w zespołach agile [Polish]InfoShare 2012 efektywne przeglądy kodu w zespołach agile [Polish]
InfoShare 2012 efektywne przeglądy kodu w zespołach agile [Polish]
Wojciech Seliga
 
Escaping Automated Test Hell - One Year Later
Escaping Automated Test Hell - One Year LaterEscaping Automated Test Hell - One Year Later
Escaping Automated Test Hell - One Year Later
Wojciech Seliga
 
Developer plantations - colonialism of XXI century (GeeCON 2017)
Developer plantations - colonialism of XXI century (GeeCON 2017)Developer plantations - colonialism of XXI century (GeeCON 2017)
Developer plantations - colonialism of XXI century (GeeCON 2017)
Wojciech Seliga
 
Spartez Open Day March 13th 2015
Spartez Open Day March 13th 2015Spartez Open Day March 13th 2015
Spartez Open Day March 13th 2015
Wojciech Seliga
 
Social Hacking
Social HackingSocial Hacking
Social Hacking
Choong Ping Teo
 
Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014
Wojciech Seliga
 
Ten lessons I painfully learnt while moving from software developer
to entrep...
Ten lessons I painfully learnt while moving from software developer
to entrep...Ten lessons I painfully learnt while moving from software developer
to entrep...
Ten lessons I painfully learnt while moving from software developer
to entrep...
Wojciech Seliga
 
10 bezcennych lekcji dla software developera stającego się szefem firmy
10 bezcennych lekcji dla software developera stającego się szefem firmy10 bezcennych lekcji dla software developera stającego się szefem firmy
10 bezcennych lekcji dla software developera stającego się szefem firmy
Wojciech Seliga
 
Software Developer Career Unplugged - GeeCon 2013
Software Developer Career Unplugged - GeeCon 2013Software Developer Career Unplugged - GeeCon 2013
Software Developer Career Unplugged - GeeCon 2013
Wojciech Seliga
 
Innowacja w praktyce - Infoshare 2014
Innowacja w praktyce - Infoshare 2014Innowacja w praktyce - Infoshare 2014
Innowacja w praktyce - Infoshare 2014
Wojciech Seliga
 
SFI 2017 Plantacje Programistów (Developers Plantations) - Colonialism in XXI...
SFI 2017 Plantacje Programistów (Developers Plantations) - Colonialism in XXI...SFI 2017 Plantacje Programistów (Developers Plantations) - Colonialism in XXI...
SFI 2017 Plantacje Programistów (Developers Plantations) - Colonialism in XXI...
Wojciech Seliga
 
Ten lessons I painfully learnt while moving from software developer to entrep...
Ten lessons I painfully learnt while moving from software developer to entrep...Ten lessons I painfully learnt while moving from software developer to entrep...
Ten lessons I painfully learnt while moving from software developer to entrep...
Wojciech Seliga
 
Software Development Innovation in Practice - 33rd Degree 2014
Software Development Innovation in Practice - 33rd Degree 2014Software Development Innovation in Practice - 33rd Degree 2014
Software Development Innovation in Practice - 33rd Degree 2014
Wojciech Seliga
 
How to be Awesome at a Java Developer Job Interview (Confitura 2012, Polish)
How to be Awesome at a Java Developer Job Interview (Confitura 2012, Polish)How to be Awesome at a Java Developer Job Interview (Confitura 2012, Polish)
How to be Awesome at a Java Developer Job Interview (Confitura 2012, Polish)
Wojciech Seliga
 
5-10-15 years of Java developer career - Warszawa JUG 2015
5-10-15 years of Java developer career - Warszawa JUG 20155-10-15 years of Java developer career - Warszawa JUG 2015
5-10-15 years of Java developer career - Warszawa JUG 2015
Wojciech Seliga
 

Viewers also liked (15)

InfoShare 2012 efektywne przeglądy kodu w zespołach agile [Polish]
InfoShare 2012 efektywne przeglądy kodu w zespołach agile [Polish]InfoShare 2012 efektywne przeglądy kodu w zespołach agile [Polish]
InfoShare 2012 efektywne przeglądy kodu w zespołach agile [Polish]
 
Escaping Automated Test Hell - One Year Later
Escaping Automated Test Hell - One Year LaterEscaping Automated Test Hell - One Year Later
Escaping Automated Test Hell - One Year Later
 
Developer plantations - colonialism of XXI century (GeeCON 2017)
Developer plantations - colonialism of XXI century (GeeCON 2017)Developer plantations - colonialism of XXI century (GeeCON 2017)
Developer plantations - colonialism of XXI century (GeeCON 2017)
 
Spartez Open Day March 13th 2015
Spartez Open Day March 13th 2015Spartez Open Day March 13th 2015
Spartez Open Day March 13th 2015
 
Social Hacking
Social HackingSocial Hacking
Social Hacking
 
Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014
 
Ten lessons I painfully learnt while moving from software developer
to entrep...
Ten lessons I painfully learnt while moving from software developer
to entrep...Ten lessons I painfully learnt while moving from software developer
to entrep...
Ten lessons I painfully learnt while moving from software developer
to entrep...
 
10 bezcennych lekcji dla software developera stającego się szefem firmy
10 bezcennych lekcji dla software developera stającego się szefem firmy10 bezcennych lekcji dla software developera stającego się szefem firmy
10 bezcennych lekcji dla software developera stającego się szefem firmy
 
Software Developer Career Unplugged - GeeCon 2013
Software Developer Career Unplugged - GeeCon 2013Software Developer Career Unplugged - GeeCon 2013
Software Developer Career Unplugged - GeeCon 2013
 
Innowacja w praktyce - Infoshare 2014
Innowacja w praktyce - Infoshare 2014Innowacja w praktyce - Infoshare 2014
Innowacja w praktyce - Infoshare 2014
 
SFI 2017 Plantacje Programistów (Developers Plantations) - Colonialism in XXI...
SFI 2017 Plantacje Programistów (Developers Plantations) - Colonialism in XXI...SFI 2017 Plantacje Programistów (Developers Plantations) - Colonialism in XXI...
SFI 2017 Plantacje Programistów (Developers Plantations) - Colonialism in XXI...
 
Ten lessons I painfully learnt while moving from software developer to entrep...
Ten lessons I painfully learnt while moving from software developer to entrep...Ten lessons I painfully learnt while moving from software developer to entrep...
Ten lessons I painfully learnt while moving from software developer to entrep...
 
Software Development Innovation in Practice - 33rd Degree 2014
Software Development Innovation in Practice - 33rd Degree 2014Software Development Innovation in Practice - 33rd Degree 2014
Software Development Innovation in Practice - 33rd Degree 2014
 
How to be Awesome at a Java Developer Job Interview (Confitura 2012, Polish)
How to be Awesome at a Java Developer Job Interview (Confitura 2012, Polish)How to be Awesome at a Java Developer Job Interview (Confitura 2012, Polish)
How to be Awesome at a Java Developer Job Interview (Confitura 2012, Polish)
 
5-10-15 years of Java developer career - Warszawa JUG 2015
5-10-15 years of Java developer career - Warszawa JUG 20155-10-15 years of Java developer career - Warszawa JUG 2015
5-10-15 years of Java developer career - Warszawa JUG 2015
 

Similar to AtlasCamp 2012 - Testing JIRA plugins smarter with TestKit

Apache DeltaSpike
Apache DeltaSpikeApache DeltaSpike
Apache DeltaSpikeos890
 
Docker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline ExecutionDocker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline Execution
Brennan Saeta
 
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Arun Gupta
 
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-JupiterToolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Boni García
 
Enterprise Guice 20090217 Bejug
Enterprise Guice 20090217 BejugEnterprise Guice 20090217 Bejug
Enterprise Guice 20090217 Bejugrobbiev
 
Dropwizard Introduction
Dropwizard IntroductionDropwizard Introduction
Dropwizard Introduction
Anthony Chen
 
Development of Java tools using SWT and WALA af Hans Søndergaard, ViaUC
Development of Java tools using SWT and WALA af Hans Søndergaard, ViaUCDevelopment of Java tools using SWT and WALA af Hans Søndergaard, ViaUC
Development of Java tools using SWT and WALA af Hans Søndergaard, ViaUC
InfinIT - Innovationsnetværket for it
 
Grails 3.0 Preview
Grails 3.0 PreviewGrails 3.0 Preview
Grails 3.0 Preview
graemerocher
 
Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019
graemerocher
 
Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java
3Pillar Global
 
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedJetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Toru Wonyoung Choi
 
CloudStack Meetup Santa Clara
CloudStack Meetup Santa Clara CloudStack Meetup Santa Clara
CloudStack Meetup Santa Clara
NetApp
 
Storage Plug-ins
Storage Plug-ins Storage Plug-ins
Storage Plug-ins buildacloud
 
Spring into rails
Spring into railsSpring into rails
Spring into rails
Hiro Asari
 
Level Up Your Integration Testing With Testcontainers
Level Up Your Integration Testing With TestcontainersLevel Up Your Integration Testing With Testcontainers
Level Up Your Integration Testing With Testcontainers
VMware Tanzu
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest services
Ioan Eugen Stan
 
JavaOne India 2011 - Servlets 3.0
JavaOne India 2011 - Servlets 3.0JavaOne India 2011 - Servlets 3.0
JavaOne India 2011 - Servlets 3.0
Arun Gupta
 
Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...
Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...
Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...telestax
 
Testing basics for developers
Testing basics for developersTesting basics for developers
Testing basics for developers
Anton Udovychenko
 

Similar to AtlasCamp 2012 - Testing JIRA plugins smarter with TestKit (20)

Apache DeltaSpike
Apache DeltaSpikeApache DeltaSpike
Apache DeltaSpike
 
Struts2 - 101
Struts2 - 101Struts2 - 101
Struts2 - 101
 
Docker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline ExecutionDocker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline Execution
 
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
 
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-JupiterToolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
 
Enterprise Guice 20090217 Bejug
Enterprise Guice 20090217 BejugEnterprise Guice 20090217 Bejug
Enterprise Guice 20090217 Bejug
 
Dropwizard Introduction
Dropwizard IntroductionDropwizard Introduction
Dropwizard Introduction
 
Development of Java tools using SWT and WALA af Hans Søndergaard, ViaUC
Development of Java tools using SWT and WALA af Hans Søndergaard, ViaUCDevelopment of Java tools using SWT and WALA af Hans Søndergaard, ViaUC
Development of Java tools using SWT and WALA af Hans Søndergaard, ViaUC
 
Grails 3.0 Preview
Grails 3.0 PreviewGrails 3.0 Preview
Grails 3.0 Preview
 
Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019
 
Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java
 
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedJetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO Extended
 
CloudStack Meetup Santa Clara
CloudStack Meetup Santa Clara CloudStack Meetup Santa Clara
CloudStack Meetup Santa Clara
 
Storage Plug-ins
Storage Plug-ins Storage Plug-ins
Storage Plug-ins
 
Spring into rails
Spring into railsSpring into rails
Spring into rails
 
Level Up Your Integration Testing With Testcontainers
Level Up Your Integration Testing With TestcontainersLevel Up Your Integration Testing With Testcontainers
Level Up Your Integration Testing With Testcontainers
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest services
 
JavaOne India 2011 - Servlets 3.0
JavaOne India 2011 - Servlets 3.0JavaOne India 2011 - Servlets 3.0
JavaOne India 2011 - Servlets 3.0
 
Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...
Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...
Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...
 
Testing basics for developers
Testing basics for developersTesting basics for developers
Testing basics for developers
 

More from Wojciech Seliga

Sprzedawanie własnego biznesu IT - Confitura 2023.pdf
Sprzedawanie własnego biznesu IT - Confitura 2023.pdfSprzedawanie własnego biznesu IT - Confitura 2023.pdf
Sprzedawanie własnego biznesu IT - Confitura 2023.pdf
Wojciech Seliga
 
Jak być zarąbistym developerem w oczach szefa i ... klienta
Jak być zarąbistym developerem w oczach szefa i ... klientaJak być zarąbistym developerem w oczach szefa i ... klienta
Jak być zarąbistym developerem w oczach szefa i ... klienta
Wojciech Seliga
 
How to impress your boss and your customer in a modern software development c...
How to impress your boss and your customer in a modern software development c...How to impress your boss and your customer in a modern software development c...
How to impress your boss and your customer in a modern software development c...
Wojciech Seliga
 
Devoxx Poland 2015: 5-10-15 years with Java
Devoxx Poland 2015: 5-10-15 years with Java Devoxx Poland 2015: 5-10-15 years with Java
Devoxx Poland 2015: 5-10-15 years with Java
Wojciech Seliga
 
Escaping Test Hell - Our Journey - XPDays Ukraine 2013
Escaping Test Hell - Our Journey - XPDays Ukraine 2013Escaping Test Hell - Our Journey - XPDays Ukraine 2013
Escaping Test Hell - Our Journey - XPDays Ukraine 2013
Wojciech Seliga
 
Confitura 2013 Software Developer Career Unplugged
Confitura 2013 Software Developer Career UnpluggedConfitura 2013 Software Developer Career Unplugged
Confitura 2013 Software Developer Career Unplugged
Wojciech Seliga
 
Bringing Effectiveness and Sanity to Highly Distributed Agile Teams
Bringing Effectiveness and Sanity  to Highly Distributed Agile TeamsBringing Effectiveness and Sanity  to Highly Distributed Agile Teams
Bringing Effectiveness and Sanity to Highly Distributed Agile Teams
Wojciech Seliga
 
JDD Effective Code Review In Agile Teams
JDD Effective Code Review In Agile TeamsJDD Effective Code Review In Agile Teams
JDD Effective Code Review In Agile Teams
Wojciech Seliga
 

More from Wojciech Seliga (8)

Sprzedawanie własnego biznesu IT - Confitura 2023.pdf
Sprzedawanie własnego biznesu IT - Confitura 2023.pdfSprzedawanie własnego biznesu IT - Confitura 2023.pdf
Sprzedawanie własnego biznesu IT - Confitura 2023.pdf
 
Jak być zarąbistym developerem w oczach szefa i ... klienta
Jak być zarąbistym developerem w oczach szefa i ... klientaJak być zarąbistym developerem w oczach szefa i ... klienta
Jak być zarąbistym developerem w oczach szefa i ... klienta
 
How to impress your boss and your customer in a modern software development c...
How to impress your boss and your customer in a modern software development c...How to impress your boss and your customer in a modern software development c...
How to impress your boss and your customer in a modern software development c...
 
Devoxx Poland 2015: 5-10-15 years with Java
Devoxx Poland 2015: 5-10-15 years with Java Devoxx Poland 2015: 5-10-15 years with Java
Devoxx Poland 2015: 5-10-15 years with Java
 
Escaping Test Hell - Our Journey - XPDays Ukraine 2013
Escaping Test Hell - Our Journey - XPDays Ukraine 2013Escaping Test Hell - Our Journey - XPDays Ukraine 2013
Escaping Test Hell - Our Journey - XPDays Ukraine 2013
 
Confitura 2013 Software Developer Career Unplugged
Confitura 2013 Software Developer Career UnpluggedConfitura 2013 Software Developer Career Unplugged
Confitura 2013 Software Developer Career Unplugged
 
Bringing Effectiveness and Sanity to Highly Distributed Agile Teams
Bringing Effectiveness and Sanity  to Highly Distributed Agile TeamsBringing Effectiveness and Sanity  to Highly Distributed Agile Teams
Bringing Effectiveness and Sanity to Highly Distributed Agile Teams
 
JDD Effective Code Review In Agile Teams
JDD Effective Code Review In Agile TeamsJDD Effective Code Review In Agile Teams
JDD Effective Code Review In Agile Teams
 

Recently uploaded

UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
UiPathCommunity
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
Globus
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
Jen Stirrup
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 

Recently uploaded (20)

UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 

AtlasCamp 2012 - Testing JIRA plugins smarter with TestKit

  • 1. Photo by kc7fys TEST JIRA PLUGINS SMARTER JIRA TestKit
  • 2. ORIGINAL PROBLEMS •a lot of functional tests - their execution is really time consuming (JIRA CI env uses 60+ remote agents and builds still may take hours) • opaque test fixtures - tons of XML dumps difficult to maintain • most of time spent by JWebUnit/HtmlUnit/Selenium/ WebDriver in UI not under test • JUnit 3.x is 12 years old...
  • 3. PROBLEM AMPLIFICATION • With WebDriver and PageObjects writing functional tests got too easy (at least superficially) and the number of them exploded • JIRA is now developed by multiple teams and consists of bundled plugins built and tested separately, but ... jira-func-tests were not easily reusable easily outside JIRA core src tree - especially against various JIRA versions.
  • 4. THE SOLUTION: REST-DRIVEN TEST FIXTURES AND ASSERTIONS • order of magnitude faster than driven by UI • less fragile (races, changes in UI) • clear and readable test fixture set-ups (no more opaque XML dumps) • stricter, more powerful and less fragile assertions
  • 5. JIRA REST API • Awesome (as of JIRA 5.0), but ... still limited • Almost non-existent for administrative operations • Use whenever you can • JRJC(JIRA REST Java Client) makes using REST API from Java very easy
  • 6. BACKDOOR • Unofficial dev-only JIRA REST API providing missing functionalities • Originally part of JIRA source tree (unavailable for mortals) • Veryeasy to extend and consume: very lightweight lifecycle, no need to care too much about long-term commitments, security, ideal shape of representations, HTTP return codes, etc. • Comes with *Control classes, which allow to easily do remote calls from Java
  • 7. JIRA TESTKIT • Backdoor for the Ecosystem • Consists of two parts: • JIRA Plugin deployed only during tests and exposing additional REST resources • Java client library talking remotely to JIRA and using these additional REST resources • We hope promote most useful resources from Backdoor to the official JIRA REST API
  • 8. HOW TO - SETUP <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-jira-plugin</artifactId> <configuration> <pluginArtifacts> <pluginArtifact> <groupId>com.atlassian.jira.tests</groupId> <artifactId>jira-testkit-plugin</artifactId> <version>${testkit.version}</version> </pluginArtifact> </pluginArtifacts> </configuration> <plugin>
  • 9. HOWTO - SETUP CONT. <dependency> <groupId>com.atlassian.jira.tests</groupId> <artifactId>jira-testkit-client</artifactId> <version>${testkit.version}</version> <scope>test</scope> </dependency>
  • 10. HOWTO - USING IN TEST public class MyPluginTest extends FuncTestCase { @Override protected void setUpTest() { super.setUpTest(); Backdoor testKit = new Backdoor( new TestKitLocalEnvironmentData()); testKit.restoreBlankInstance( TimeBombLicence.LICENCE_FOR_TESTING); testKit.usersAndGroups().addUser("test-user"); testKit.websudo().disable(); testKit.subtask().enable(); // ... } // ... }
  • 11. public class TestBugzillaImporter extends TestBase { private JiraRestClient restClient; @Before public void setUpTest() { backdoor().restoreBlankInstance(); backdoor().attachments().enable(); backdoor().timeTracking().enable("8", "5", TimeTracking.Format.PRETTY, TimeTracking.Unit.HOUR, TimeTracking.Mode.MODERN); restClient = ITUtils.createRestClient(jira().environmentData()); } @Test public void someTest() { // execute your test using Page Objects / WebDriver // ... // maybe you need some special license assertTrue(backdoor().license().switchToPersonalLicense()); // ... // maybe it should create a user and put it into an appropriate group assertTrue(backdoor().usersAndGroups().userExists("mytestuser")); assertTrue(backdoor().usersAndGroups().isUserInGroup("mytestuser", "jira-users")); // maybe it creates a JIRA issue final Issue issue = restClient.getIssueClient().getIssue("TES-19", new NullProgressMonitor()); assertEquals("expectedreporter", issue.getReporter().getName()); assertEquals("expectedassignee", issue.getAssignee().getName()); } }
  • 12. HOW CAN I USE IT • It's hot and bleeding edge, still changing shape (right as I am speaking) • https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Smarter +integration+testing+with+TestKit • https://bitbucket.org/atlassian/jira-testkit/ (planning to open-source it) • https://bitbucket.org/atlassian/jira-testkit-example • https://marketplace.atlassian.com/plugins/com.atlassian.jira.tests.jira-testkit- plugin • JIRA Importers Plugin source code (bundled with JIRA src distro)
  • 13. DON'T USE IN PRODUCTION!