ABL Unit testing framework for OE11.6 ? - Forum - OpenEdge Development - Progress Community

ABL Unit testing framework for OE11.6 ?

 Forum

ABL Unit testing framework for OE11.6 ?

  • ok so we have to modify build.xml for this.

    I want to confirm one thing here that we can modify build.xml for ABLUnit Testing as well as for generating ABLDoc and then Jenkins will pick these ANT task  based on the Jenkins configuration for these tasks , rite ?

  • Right.

    Jenkins will execute ANT jobs. By default the build.xml in the Job's workspace root is executed. But it can run other ANT scripts (even no need to call them build.xml).

    Jenkins will by default execute the default target in the build file. But you can specific different targets (space delimited) to execute in the configuration of the ANT build command.

    Architect of the SmartComponent Library and WinKit

    Consultingwerk Ltd.

  • ok  gr8. What will be the location for this build.xml file, where I can get this  ? Can we create separate xml for each ANT task  with diff name say UnitTest. \xml ?

  • whereever you put it.

    Architect of the SmartComponent Library and WinKit

    Consultingwerk Ltd.

  • OK. I thought this file is already available in the DLC path. So we have to create it first time and then we can add each task details in it ?

    Also can we create separate xml for each ANT task  with diff name say UnitTest.xml or we have to create build.xml file only and add the details ?

  • I have created one Unit test framework project under 11.6 and it has created one tests folder by default to design unit test programs. The path of this project is under my workspace dir like C:\User1\WorkSpace\ABLUnitTestFrmWrk

    I have created one another new folder SRC for Business logic class programs and designed ABLUnit test cases for that class under tests class. All is working fine, getting results on ABLUnit view as expected and generating result.xml aswell.

    Now i designed build xml for automated builds for ABLUnit test as below but i am not sure on the workspace dir. Where to put the path of workspace directory for src and tests folder in this build.xml file ?

  • ok so we have to modify build.xml for this.

    You do not have to change PROPATH. These are added automatically (unless you've explicitly told the AVM not to, by means of the –baseADE switch). You may need to copy the PLs to the server since they're not installed with all products but once they're in those locations they will always be added to propath.
     
     
     
  • Hi

    I have created one sample build.xml file for my unit test as below. Can someone check the defined basedir and DLC_HOME parameters, means the way of defining these parameters.

    what is the use of tofile and outdir parameters ?

  • Your 'build.xml' file looks fine. I think there is a space in basedir after 'C:'.

    After successfully run the test, the  results of the test will be written in XML format. Your 'toDir' specified the location to write this file, and 'outfile' is the name of the file. In your case, 'result-TestClass1-gui.xml' file will be created in the toDir location.

    --

    Regards,

    Phani S.

  • If I don't put outfile parameter , will it create default file in the toDir location ?

    Also How can I configure this XML in CI server that is Jerkin without any dependency on any other ANT task ?

    In the Continuous Integration document they mentioned like  whenever the code changes are committed to source control, CI Server will trigger the build, run the tests, verifies the result of the test and send feedback to the developers regarding the quality if the build based on the test results.

    I don't want any dependency on the committed source, I want to run build.xml separately  for Unit Tests as a scheduled batch.

  • Thanks guyz for ur help, finally I am able to execute my Unit Test cases as a ANT task using 11.6 developer studio and with command line.  

    Where can I get all the list of assertions with how we can use them with the parameter details if available ?

  • The list you can find it: community.progress.com/.../42269

  • Thanks, that list is there but how we can use those assertions means the calling syntax for those assertions. I need more info on this.

  • You can find Assert API documentation at documentation.progress.com/.../index.html. Please navigate to OpenEdge->Core->Assert class for all Assertions available.

  • Thanks Divya