Difference between revisions of "Unit Testing"

From Gcube Wiki
Jump to: navigation, search
(Created page with 'Unit testing is a testing methodology by which a software system is split in elementary units and each unit is tested in isolation and independently from other units. A unit coul…')
 
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
  
  
ETICSJunitPlugin is driven by following properties that [[Role Developer|developers]] can customize in ETICS configuration of their gCube component.
+
ETICSJunitPlugin is driven by following properties that [[Role Developer|developers]] can customize in ETICS configuration of their gCube component:
 +
* '''junit.lib.location''': Directory containing the external libraries (JAR files) required to execute the test. Default is ''${src.location}/lib'' or if not present ''${src.location}/endorsed'' or again ''${stageDir}/share/java''
 +
* '''unit.jars.location''': Directory containing the (non-test) JAR files of the application, if available. Default is ''${src.location}/jars''  or if not present ''${src.location}/build/jars''
 +
* '''junit.test.class''': Fully qualified name of the Unit Test class to execute. Deafult is All tests in ''junit.test.location''
 +
* '''junit.test.location''': Root of the directory structure where the compiled Java test and .class are placed. Default is ''${src.location}/test/classes'' or if not present ''${src.location}/build/classes-test''
  
  
 +
At the moment, junit plugin is not executed during [[Continuous Integration procedure|integration builds]] for performance issues. [[Role Developer|Developers]] can still run their Junit Testsuites submitting builds from the ETICS Portal.
  
 
'''Please note''' that ETICS will only execute Testsuites found after the component's check out from the SVN. Therefore, [[Role Developer|developers]] are responsible for committing Testsuites in the source code repository along with their component's code.
 
'''Please note''' that ETICS will only execute Testsuites found after the component's check out from the SVN. Therefore, [[Role Developer|developers]] are responsible for committing Testsuites in the source code repository along with their component's code.

Latest revision as of 17:56, 15 January 2012

Unit testing is a testing methodology by which a software system is split in elementary units and each unit is tested in isolation and independently from other units. A unit could be an entire module, a class or a single method or procedure.

The ETICS build system gives the possibility of running automatically Junit Testsuites during the build process. The ETICSJunitPlugin (further explained here) is capable of finding and executing Junit Testsuites in gCube components home directories. Reports generated are published along with other build reports.


ETICSJunitPlugin is driven by following properties that developers can customize in ETICS configuration of their gCube component:

  • junit.lib.location: Directory containing the external libraries (JAR files) required to execute the test. Default is ${src.location}/lib or if not present ${src.location}/endorsed or again ${stageDir}/share/java
  • unit.jars.location: Directory containing the (non-test) JAR files of the application, if available. Default is ${src.location}/jars or if not present ${src.location}/build/jars
  • junit.test.class: Fully qualified name of the Unit Test class to execute. Deafult is All tests in junit.test.location
  • junit.test.location: Root of the directory structure where the compiled Java test and .class are placed. Default is ${src.location}/test/classes or if not present ${src.location}/build/classes-test


At the moment, junit plugin is not executed during integration builds for performance issues. Developers can still run their Junit Testsuites submitting builds from the ETICS Portal.

Please note that ETICS will only execute Testsuites found after the component's check out from the SVN. Therefore, developers are responsible for committing Testsuites in the source code repository along with their component's code.