Skip to content

ABLUnit tests

zerovian edited this page Feb 25, 2020 · 1 revision

Example

plugins {
  id "oe.espresso.latte" version "0.2.4"
}    

import oe.espresso.latte.*

task compileCode(type: CompileAblTask) {
    source('src/main/abl')
    include('**/*.p')
    destinationDir = file("${buildDir}")
}

task createPL(type: CreateProcedureLibrary) {
    dependsOn compileCode
    destFile = "${buildDir}/test.pl"
    baseDir = "${buildDir}"
    includes= "**/*.r"
}

task ablTest(type: AblUnit) {
  dependsOn compileCode
  source("src/test/abl")
  include("*.cls")
  destinationDir = "${buildDir}"
  writeLog = true
  baseDir = "${buildDir}"
  propath = project.files("src/test/abl", "${buildDir}/test.pl")
}

Use the command ./gradlew ablTest to run this example.

If successful, a results.xml will be generated into the build directory that contains a unit test report.

Properties

Troubleshooting ABLUnit

Use the writeLog option (default false) to debug issues such as failed compilation with your unit tests.