Integration Tests
Total Page:16
File Type:pdf, Size:1020Kb
Welcome .............................................................................................................................................. 7 What is Buildr? ................................................................................................................................ 7 News.................................................................................................................................................. 8 Notices.............................................................................................................................................. 8 Getting Started.................................................................................................................................... 9 Installing Buildr ................................................................................................................................ 9 Linux .............................................................................................................................................. 9 OS X............................................................................................................................................ 10 Windows .................................................................................................................................... 11 JRuby............................................................................................................................................ 12 Document Conventions.............................................................................................................. 13 Running Buildr ............................................................................................................................... 14 Help Tasks...................................................................................................................................... 15 Learning More ............................................................................................................................... 16 Projects ............................................................................................................................................... 17 Starting Out ................................................................................................................................... 17 The Directory Structure............................................................................................................. 19 Naming And Finding Projects..................................................................................................... 22 Running Project Tasks ................................................................................................................. 23 Setting Project Properties........................................................................................................... 24 2 Resolving Paths.............................................................................................................................. 25 Defining The Project.................................................................................................................... 26 Writing Your Own Tasks ........................................................................................................... 28 Building ................................................................................................................................................ 29 Compiling........................................................................................................................................ 29 Resources ....................................................................................................................................... 34 More On Building ......................................................................................................................... 36 Cleaning........................................................................................................................................... 37 Artifacts............................................................................................................................................... 39 Specifying Artifacts ....................................................................................................................... 40 Specifying Repositories................................................................................................................ 42 Downloading Artifacts................................................................................................................. 43 Install and Upload ......................................................................................................................... 45 Packaging............................................................................................................................................. 47 Specifying And Referencing Packages....................................................................................... 48 Packaging ZIPs ............................................................................................................................... 50 Packaging JARs............................................................................................................................... 52 Packaging WARs ........................................................................................................................... 54 Packaging AARs............................................................................................................................. 55 Packaging EARs.............................................................................................................................. 56 Packaging Tars and GZipped Tars ............................................................................................ 58 Installing and Uploading............................................................................................................... 58 Packaging Sources and JavaDocs ............................................................................................... 60 Testing................................................................................................................................................. 61 Writing Tests................................................................................................................................. 61 3 Excluding Tests and Ignoring Failures ...................................................................................... 62 Running Tests ................................................................................................................................ 63 Integration Tests........................................................................................................................... 64 Using Setup and Teardown ........................................................................................................ 65 Testing Your Build........................................................................................................................ 66 Behaviour-Driven Development ............................................................................................... 68 Settings/Profiles ................................................................................................................................. 70 Environment Variables................................................................................................................. 70 Personal Settings........................................................................................................................... 72 Build Settings.................................................................................................................................. 73 Non constant settings.................................................................................................................. 75 Environments................................................................................................................................. 75 Profiles............................................................................................................................................. 76 Languages............................................................................................................................................ 79 Java ................................................................................................................................................... 79 Compiling Java ........................................................................................................................... 79 Testing with Java ....................................................................................................................... 80 Scala ................................................................................................................................................. 83 Compiling Scala ......................................................................................................................... 84 Testing with Scala ..................................................................................................................... 85 Groovy ............................................................................................................................................ 87 Compiling Groovy...................................................................................................................