Your SlideShare is downloading. ×
Comparative Development Methodologies
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Comparative Development Methodologies

743
views

Published on

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
743
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Comparative Development Methodologies Lecture 7 XP (Tools) For the BSc IS&M Programme Dell Zhang Birkbeck , University of London
  • 2. From Teach Yourself Extreme Programming In 24 Hours .
  • 3. Something New
    • Version Control
      • Subversion ( http:// subversion.tigris.org / )
        • TortoiseSVN ( http:// tortoisesvn.tigris.org / )
      • Git ( http:// git.or.cz / )
    • Testing
      • xUnit, e.g., JUnit ( http:// www.junit.org / ): client
      • Cactus ( http://jakarta.apache.org/cactus/ ): server
  • 4. Something New
    • Automated Build & Project Management
      • Apache Ant ( http:// ant.apache.org / )
      • Apache Maven ( http://maven.apache.org/ )
    • Bug-Tracking & Project Management
      • Trac ( http:// trac.edgewall.org / )
  • 5. Something New
    • Code Generation
      • XDoclet ( http:// xdoclet.sourceforge.net / )
    • Collaboration
      • Wiki ( http:// en.wikipedia.org /wiki/Wiki )
    • Development Environment
      • Eclipse ( http://www.eclipse.org/ )
      • jEdit ( http:// www.jedit.org / )
  • 6. Version Control
    • Do you work in a team?
    • Has it ever happened that you were working on a file, and someone else was working on the same file at the same time? Did you lose your changes to that file because of that?
    • Have you ever saved a file, and then wanted to revert the changes you made? Have you ever wished you could see what a file looked like some time ago?
    • Have you ever found a bug in your project and wanted to know when that bug got into your files?
  • 7. Version Control
  • 8.  
  • 9.  
  • 10.  
  • 11.  
  • 12.  
  • 13.  
  • 14.
    • Features
      • Directory versioning
      • Atomic commits
      • Versioned metadata
      • Choice of network layers
      • Consistent data handling
      • Efficient branching and tagging
      • Hackability
  • 15.  
  • 16.  
  • 17.  
  • 18. xUnit
    • The xUnit testing framework is a simple, easy-to-use unit testing tool.
    • T here are many versions of the framework, depending on language .
      • JUnit for Java,
      • CppUnit for C++
      • PyUnit for Python
      • VBUnit for Visual Basic
      • ……
  • 19. Recall: Test Driven Development
    • If it's worth building, it's worth testing.
    TDD lifecycle
  • 20. JUnit
    • Architecture
  • 21. JUnit
    • Packages
      • import org.junit.Test
      • import static org.junit.Assert.*
      • ……
  • 22. JUnit
    • Simple Test Case
      • Annotate a method with @Test
      • C heck values with assertions
        • assertEquals
        • assertTrue ; assertFalse
        • assertSame; assertNotSame
        • assertNull; assertNotNull
        • fail; …
    http:// junit.sourceforge.net/javadoc/junit/framework/Assert.html
  • 23.  
  • 24. JUnit
    • Fixture
      • Tests need to run against the background of a known set of objects which is called a test fixture.
      • Often, you will be able to use the same fixture for several different tests.
      • Each case will send slightly different messages or parameters to the fixture and will check for different results.
  • 25. JUnit
    • Initialization/Releasing for Common Fixture
      • Run before and after each test
        • @Before
        • @After
      • Run before and after all tests
        • @BeforeClass
        • @AfterClass
  • 26. JUnit
    • New Testing Methods in JUnit4
      • Test for exceptions
        • @Test(expected = Exception.class)
      • Test for performance
        • @Test(timeout = 500)
  • 27.  
  • 28. JUnit
    • Test Runners
      • The test runner will use reflection to ascertain test names at runtime, and then execute your tests.
      • JUnit4 only comes with a textual TestRunner.
        • org.junit.runner.TextListener.run(TestClass1.class, ...); 
      • For graphical interface,
        • Use an IDE that supports JUnit4.
  • 29. JUnit Plugin for Eclipse
  • 30. JUnit
    • Failure vs. Errors
      • F ailure s are anticipated and checked for with assertions .
      • Errors are unanticipated problems .
  • 31. Ant
    • Ant is a n automated build tool
      • Java-based
      • Open Source
      • An Apache project
      • Driven by an XML format build file
      • L ike make , but without make 's wrinkles
      • Comes with Eclipse
  • 32. Ant
    • Build Process
      • Get latest source code
      • Clean target folders
      • Create new target folders
      • Compile and link source
      • Run unit tests
      • Deploy to staging
  • 33. Ant
    • Build File – Layout
  • 34. Ant
    • Build File – Tags
      • Project
        • The top-level tag in the build file that describes the project itself.
      • Target
        • A target defines a collection of Ant tasks.
        • A target can depend on other targets.
        • A target also has the capability to perform its execution if (or unless) a property has been set.
  • 35. Ant
    • Build File – Tags
      • Task
        • A task is a piece of code that can be executed.
        • A task can have multiple attributes or arguments.
          • The value of an attribute might contain references to a property.
          • These references will be resolved before the task is executed.
        • There is a set of built-in tasks, along with a number of optional tasks; it's also very easy to write your own.
  • 36. Ant
    • Build File – Tags
      • Task ( http://ant.apache.org/manual/tasksoverview.html )
        • Archive; Audit/Coverage; Compile; Deployment; Documentation; EJB; Execution; File; Java2 Extensions; Logging; Mail; Miscellaneous; .NET; Pre-process; Property; Remote; SCM; Testing; Visual Age for Java …
  • 37. Ant
    • Build File – Tags
      • Property
        • A project can have a set of properties.
        • A property has a name and a value.
        • Properties can be used in the value of tag attributes.
          • This is done by placing the property name between "${" and "}" in the attribute value, e.g. ${builddir}.
        • In addition to properties defined in the build file, Ant also provides access to all system properties and some built-in properties.
  • 38. Ant
    • Build File – Example
  • 39. Ant
  • 40. Ant
    • Integrating Unit Tests and Build
      • Setting u p the Test Data with Ant
        • Ant can be used to directly execute SQL commands onto any database that supports ODBC (via JDBC ) .
      • Running JUnit Test s from Ant
      • Using Ant to Email Test Reports
  • 41.  
  • 42. Take Home Messages
    • Subversion
      • Version Control Tool
      • http:// subversion.tigris.org /
    • JUnit
      • Unit Testing Tool
      • http://www.junit.org/
    • Ant
      • Automated Build Tool (and Much More)
      • http://ant.apache.org/

×