Hi All,
Help me to get the white papers for OE11.6 ABL Unit testing framework.
Please find link for ABLUnit documentation:
How do I run ABLUnit test using Ant task as part of automated builds ?
I really don't have any idea on Ant task. I am using OE11.6. Do I need to install Ant task separately ?
I have created some sample ABLUnit tests programs and are running fine in Developer Studio. Now I want to test those with Ant task. Please guide me on this stuff.
[View:/cfs-file/__key/communityserver-discussions-components-files/19/3288.ABLUnit-whitepaper-_2D00_-End-to-end-flow.pdf:320:240]
You can use ABLUnit Ant task to automate your builds.
Basic concepts of Ant are required to understand how Ant works and how to configure and use ABLUnit as an Ant task.
The below page can be referred how to setup Ant to work with.
[View:http://ant.apache.org/manual/install.html:320:50]
Below is the sample file of build.xml which is configured with the ABLUnit tests.
[View:/cfs-file/__key/communityserver-discussions-components-files/19/4478.build.xml:320:240]
Developer includes the Ant tooling support. You can run the build.xml file as an Ant task (See Run As -> on build.xml file)
--
Regards,
Phani S.
Hi Thanks
Basically I am looking for ABLUnit testing from automate builds. We have Jenkins for that.
Can you guide me on how to make ABLUnit testing automated builds.
Hello Atul,
Here is the whitepaper on continuous integration for OE Apps which include ABLUnit too. Build xml file structure might be different from the one in this document. However, this document provides steps to integrate ABLUnit tests with Jenkins.
Hope this helps,
DivyaTheja
Here is the link for documentation: community.progress.com/.../1066
Thanks Divya. will check on this.
Hi,
For ANT configuration, we need apache to be installed on our server and then we can set env variables ANT_HOME and add ANT_HOME\bin to PATH parameter ?
Or
we have to create ANT folder manually and create sub folder bin, lib inside it and then set env variables ?
Hello Atul,
For that, ANT needs to be installed on your server. In case, If you have PDSOE installed on your server, PDSOE ships ANT too. All you need to do is set ANT dir in DLC\oeide\plugins\C:\Progress\OpenEdge\oeide\eclipse\plugins\org.apache.ant_<ver> to ANT_HOME variable.
Ya got it. PDSOE installed on my server and found the directory in the path as suggested. I added this path in ANT_HOME and ANT_HOME\bin to PATH.
Thanks.
Now, I copied ant-ablunit.jar from <OpenEdge Installation>\java and placed the jar in ANT_HOME\lib folder. In the document they have mentioned "Add ablunit.pl and OpenEdge.Core.pl (available under <Installation>\<gui or <Installation>\tty>) are added to PROPATH."
Where to add these 2 pl files ?
These libraries needs to added to PROPATH in build.xml file.
Here is the example:
<propath>
<pathelement path="src" />
<pathelement path="tests" />
<pathelement location="${DLC}\gui\ablunit.pl" />
<pathelement location="${DLC}\gui\OpenEdge.Core.pl" />
</propath>
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.
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.
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.
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
Hi,
What is the best way to organize the unit test cases in the existing folder structure of the application or in studio ?
any update on my post ?
There is no best way, you have to figure it out yourself. Only you know the context in which the unit tests live/operate.