atlascamp 2011 - five strategies to accelerate plugin development
DESCRIPTION
TRANSCRIPT
2
Lessons from Speakeasy
Don BrownIntegration Architect, Atlassian
Five Strategies to Accelerate Plugin Dev
3
Just one year ago…
6
1. Discover your plugin with Speakeasy
2. Define interactions with page objects
3. Optimize your dev loop with the SDK
4. Reuse functionality with AUI
5. Encourage feedback
Five Strategies
7
1. Discover your plugin with Speakeasy
8
9
Validate your assumptions!
10
The #1 time waster is not building the
plugin poorly, but is building the wrong
plugin
Me, channeling Eric Ries
”“
11
Example: Inline CommentingAssumption Test
Users want to comment on specific lines in on a page
Look through last 100 comments, note cause and use of quotes
Users want to see number of comments on a line
Edit a few heavily commented pages and see if the linked numbers help or hurt
Slowness of commenting causing fewer comments and annoyed users
Get stats on how often people comment. Ask heavy comment authors their gripes.
Social Validation
Speakeasy Prototype
Plugin
13
Examine a recent plugin idea and try to
identify your assumptions and how you
might test them”“
14
2. Define Interactions with Page Objects
16
Selenium in 30 Seconds
17
Testing is Like Diets
18
Selenium the Ugly
waitForEntityRowToBeAdded(); // check entity row has been created assertThat.textPresent("Schultz"); assertThat.textPresent("brown"); assertEquals("Delete", client.getText("link=Delete")); // now we delete client.click("link=Delete"); client.waitForAjaxWithJquery(); client.click("//div[@id='delete-application-link-dialog']/div[2]/div[2]/button"); client.waitForAjaxWithJquery(); client.click("//div[@id='delete-application-link-dialog']/div[2]/div[2]/button");
19
Reminds Me of These Days:
if(request.getParameter("action") != null){ String bookname=request.getParameter("bookname"if(request.getParameter("action") != null){ String bookname=request.getParameter("bookname"); String author=request.getParameter("author"); stmt.executeUpdate("insert into books_details(book_name,author) values('"+bookname+"','"+author+"')"); rst=stmt.executeQuery("select * from books_details"); %> <html> <body> <center> <h2>Books List</h2>
20
JSP Solution: Data Access Objects
Selenium Solution: Page Objects
21
Boldly go where no functional test has gone before…
22
This ain’t no theory. . .
23
• JIRA 4.x, 5.0
• Confluence 3.x, 4.x
• Bamboo 3.3
• FishEye/Crucible, coming soon
Use Now!
24
Take a look at the Atlassian page object
docs and try to write a hello world test
for your plugin”“
25
3. Optimize the Dev Loop with the SDK
26
All About the Gap
Gap between edit and view
Productivity
27
These Are Your Enemies
28
Edit -> Refresh
js/vm,hotswapchanges
Gap between edit and view
Productivity
29
Edit -> ‘pi’ -> Refresh
javachanges
Gap between edit and view
Productivity
30
Edit -> CTRL-C -> atlas-run
WEB-INF/libchanges
Gap between edit and view
Productivity
31
Speaking of atlas-run. . .
32
Run Simultaneously
Switch between productsTerminal tab per instance
33
Quickly Spot Errors
In your .bashrc file
export MAVEN_COLOR=true
34
Track how many times you alt-tab away
from development in a day and try to
decrease it”“
35
4. Reuse UI with AUI
36
A few of my favorite things
37
Tabbed Panels!
38
Messages!
39
Dialogs!
40
Play with the AUI sandbox and try out a
few components”“
41
5. Make Feedback Dead Simple
42
43
JIRA Mobile Connect
Automated crash reportingas a JIRA issue
Message reporters directly,attached to the issue
44
JIRA Issue Connector
Embeddable JavaScript to allow users to raise issues for your
plugin
45
Make It Rewarding
46
Add JIRA Issue Connector to as an
optional feature to your plugin for
dogfooding”“
48
49
But before I go. . .
50
The JIRA Studio Problem
How to allow plugins without breaking Studio?
54
• What if plugins ran on your server like Facebook Applications?
• What if all you had to install in JIRA Studio was a single XML descriptor file?
• What if you could write a plugin that could be deployed for JIRA Studio or custom instances without changes?
2012 Project: Remote Plugins
55
• Are you interested in deploying plugins for our JIRA Studio customers?
• Would you like to use this capability for custom instances?
• Would you be interested in having early access?
Contact me: [email protected] or @mrdonbrown
Let me know. . .
Thank you!
61
• Speakeasy
• Page Objects – Coming soon
• Plugin SDK
• Multiple products
• Colorization
• Atlassian User Interface (AUI)
• JIRA Mobile Connect
• JIRA Issue Connector
References