Thread: [Jameleon-cvscommits] SF.net SVN: jameleon: [1185] trunk/jameleon-core
Brought to you by:
engrean
From: <en...@us...> - 2006-11-12 18:23:43
|
Revision: 1185 http://svn.sourceforge.net/jameleon/?rev=1185&view=rev Author: engrean Date: 2006-11-12 10:18:07 -0800 (Sun, 12 Nov 2006) Log Message: ----------- Merging jameleon-core-3_3-M3 to the trunk (1179) Modified Paths: -------------- trunk/jameleon-core/README.txt trunk/jameleon-core/build.properties trunk/jameleon-core/build.xml trunk/jameleon-core/docs/Jameleon_manual.odt trunk/jameleon-core/etc/test/passingAndFailingRows.csv trunk/jameleon-core/lib/commons-jelly-1.0.jar trunk/jameleon-core/lib/jdic.jar trunk/jameleon-core/lib/junit.jar trunk/jameleon-core/lib/linux/jdic_stub.jar trunk/jameleon-core/lib/linux/x86/libmozembed-linux-gtk1.2.so trunk/jameleon-core/lib/linux/x86/libmozembed-linux-gtk2.so trunk/jameleon-core/lib/linux/x86/mozembed-linux-gtk1.2 trunk/jameleon-core/lib/sunos/jdic_stub.jar trunk/jameleon-core/lib/sunos/sparc/libjdic.so trunk/jameleon-core/lib/sunos/sparc/libmozembed-solaris-gtk2.so trunk/jameleon-core/lib/sunos/sparc/libtray.so trunk/jameleon-core/lib/sunos/sparc/mozembed-solaris-gtk2 trunk/jameleon-core/lib/sunos/x86/libjdic.so trunk/jameleon-core/lib/sunos/x86/libmozembed-solaris-gtk2.so trunk/jameleon-core/lib/sunos/x86/mozembed-solaris-gtk2 trunk/jameleon-core/lib/windows/jdic_stub.jar trunk/jameleon-core/lib/windows/x86/IeEmbed.exe trunk/jameleon-core/lib/windows/x86/MozEmbed.exe trunk/jameleon-core/lib/windows/x86/jdic.dll trunk/jameleon-core/lib/windows/x86/tray.dll trunk/jameleon-core/project.properties trunk/jameleon-core/project.xml trunk/jameleon-core/res/TestCaseDocsTemplate.txt trunk/jameleon-core/res/ant/JameleonAntTasks.properties trunk/jameleon-core/res/log4j.properties trunk/jameleon-core/src/java/net/sf/jameleon/AbstractCsvTag.java trunk/jameleon-core/src/java/net/sf/jameleon/AbstractParamElementTag.java trunk/jameleon-core/src/java/net/sf/jameleon/AbstractTestCaseDocAttribute.java trunk/jameleon-core/src/java/net/sf/jameleon/ExecuteTestCase.java trunk/jameleon-core/src/java/net/sf/jameleon/JameleonTagSupport.java trunk/jameleon-core/src/java/net/sf/jameleon/ParamNameTag.java trunk/jameleon-core/src/java/net/sf/jameleon/ParamTag.java trunk/jameleon-core/src/java/net/sf/jameleon/ParamTypeTag.java trunk/jameleon-core/src/java/net/sf/jameleon/ParamValueTag.java trunk/jameleon-core/src/java/net/sf/jameleon/SessionTag.java trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTagLibrary.java trunk/jameleon-core/src/java/net/sf/jameleon/VariableMappingTag.java trunk/jameleon-core/src/java/net/sf/jameleon/VariableTag.java trunk/jameleon-core/src/java/net/sf/jameleon/XMLable.java trunk/jameleon-core/src/java/net/sf/jameleon/ant/ExecuteTestCaseTask.java trunk/jameleon-core/src/java/net/sf/jameleon/ant/JameleonXDoclet.java trunk/jameleon-core/src/java/net/sf/jameleon/bean/Attribute.java trunk/jameleon-core/src/java/net/sf/jameleon/bean/FunctionalPoint.java trunk/jameleon-core/src/java/net/sf/jameleon/bean/Javadoc2Bean.java trunk/jameleon-core/src/java/net/sf/jameleon/bean/MatchingTextHelper.java trunk/jameleon-core/src/java/net/sf/jameleon/bean/Session.java trunk/jameleon-core/src/java/net/sf/jameleon/bean/TestCase.java trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractFileDrivableTag.java trunk/jameleon-core/src/java/net/sf/jameleon/data/CollectionDataDriver.java trunk/jameleon-core/src/java/net/sf/jameleon/data/CsvDataDriver.java trunk/jameleon-core/src/java/net/sf/jameleon/data/DataDrivable.java trunk/jameleon-core/src/java/net/sf/jameleon/data/DataDriver.java trunk/jameleon-core/src/java/net/sf/jameleon/data/DataExecuter.java trunk/jameleon-core/src/java/net/sf/jameleon/data/SqlDataDriver.java trunk/jameleon-core/src/java/net/sf/jameleon/data/SqlTag.java trunk/jameleon-core/src/java/net/sf/jameleon/event/DataDrivableEvent.java trunk/jameleon-core/src/java/net/sf/jameleon/event/DataDrivableEventHandler.java trunk/jameleon-core/src/java/net/sf/jameleon/event/TestCaseEvent.java trunk/jameleon-core/src/java/net/sf/jameleon/exception/JameleonTagException.java trunk/jameleon-core/src/java/net/sf/jameleon/function/AttributeBroker.java trunk/jameleon-core/src/java/net/sf/jameleon/function/ContextHelper.java trunk/jameleon-core/src/java/net/sf/jameleon/function/FunctionTag.java trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonHTMLLayout.java trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonSimpleLayout.java trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonXMLLayout.java trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/ExecuteJameleonScriptTag.java trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/tags/AssertEqualsTag.java trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/tags/AssertNotNullTag.java trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/tags/AssertTrueTag.java trunk/jameleon-core/src/java/net/sf/jameleon/result/FunctionResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/SessionResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/TestCaseResult.java trunk/jameleon-core/src/java/net/sf/jameleon/sql/AbstractSqlTag.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/FunctionalPointTree.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/JameleonUI.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/TCTreeNode.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCaseDocsExecutor.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCasePane.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCaseResultsFrame.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCaseTree.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/Utils.java trunk/jameleon-core/src/java/net/sf/jameleon/util/Configurator.java trunk/jameleon-core/src/java/net/sf/jameleon/util/JameleonDefaultValues.java trunk/jameleon-core/src/java/net/sf/jameleon/util/JameleonUtility.java trunk/jameleon-core/src/java/net/sf/jameleon/util/JsseSettings.java trunk/jameleon-core/src/java/net/sf/jameleon/util/SupportedTags.java trunk/jameleon-core/src/java/net/sf/jameleon/util/TestCaseDocsTransformer.java trunk/jameleon-core/src/java/net/sf/jameleon/util/XMLHelper.java trunk/jameleon-core/src/test-suite/build.properties trunk/jameleon-core/src/test-suite/httpunit-sourceforge.xml trunk/jameleon-core/src/test-suite/jiffie-sourceforge.xml trunk/jameleon-core/src/xml/standard-build.xml.fragment trunk/jameleon-core/tst/java/TestAll.java trunk/jameleon-core/tst/java/net/sf/jameleon/CsvTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/JameleonTagSupportTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/MockCsvTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/MockSessionTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/SessionTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/TestCaseTagLibraryTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/TestCaseTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/ant/JameleonXDocletTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/AttributeTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Dummy1.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Dummy2.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Dummy2Sub.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Dummy3.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Dummy4.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/DummyWithApplication.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/DummyWithApplications.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/FunctionalPointTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Javadoc2BeanTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/MatchingTextHelperTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/SessionTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/TestCaseTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/CollectionDataDriverTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/CsvDataDriverTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/DataExecuterTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/IterateTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/SqlDataDriverTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/SqlTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/SqlTestTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/function/ContextHelperTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/function/FunctionTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/function/MockFunctionTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/BrokeredAttributesTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/FunctionWithParamsTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/SimpleFunction.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/SimpleFunctionCompareTwoVars.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/SimpleFunctionWithTwoVars.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/TestAssertLevelTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/TestListSizeTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/TestSessionTagBeginSession.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/FunctionResultTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/SessionResultTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestCaseResultTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/util/ConfiguratorTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/util/JameleonUtilityTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/util/SupportedTagsTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/util/XMLHelperTest.java trunk/jameleon-core/tst/xml/acceptance/appNamePropertiesNoApplicationsProperties.xml trunk/jameleon-core/tst/xml/acceptance/baseDir.xml trunk/jameleon-core/tst/xml/acceptance/brokeredAttributes.xml trunk/jameleon-core/tst/xml/acceptance/csvSeparatorValue.xml trunk/jameleon-core/tst/xml/acceptance/csv_nested_param_tag.xml trunk/jameleon-core/tst/xml/acceptance/csv_nested_param_value_tag.xml trunk/jameleon-core/tst/xml/acceptance/csv_null_value.xml trunk/jameleon-core/tst/xml/acceptance/fineGrainedTests.xml trunk/jameleon-core/tst/xml/acceptance/mapVariableDecodeXmToText.xml trunk/jameleon-core/tst/xml/acceptance/mapVariableFromCsvFile.xml trunk/jameleon-core/tst/xml/acceptance/mapVariableFromPropertiesFile.xml trunk/jameleon-core/tst/xml/acceptance/mapVariableFromVariableValue.xml trunk/jameleon-core/tst/xml/acceptance/mapVariableFromVariableValues.xml trunk/jameleon-core/tst/xml/acceptance/mapVariableFromVariableValuesOutsideFP.xml trunk/jameleon-core/tst/xml/acceptance/nested_csv_substitute_variable_values.xml trunk/jameleon-core/tst/xml/acceptance/propertiesFileVariable.xml trunk/jameleon-core/tst/xml/acceptance/propertiesFileVariableWithOrg.xml trunk/jameleon-core/tst/xml/acceptance/propsName.xml trunk/jameleon-core/tst/xml/acceptance/testcaseTagCsvDir.xml trunk/jameleon-core/tst/xml/acceptance/utf-8.xml trunk/jameleon-core/tst/xml/antTestScript.xml trunk/jameleon-core/tst/xml/framework/assertEqualsFail.xml trunk/jameleon-core/tst/xml/framework/assertEqualsPass.xml trunk/jameleon-core/tst/xml/framework/assertGreaterThanAcceptance.xml trunk/jameleon-core/tst/xml/framework/assertGreaterThanFunction.xml trunk/jameleon-core/tst/xml/framework/assertGreaterThanRegression.xml trunk/jameleon-core/tst/xml/framework/assertGreaterThanSmoke.xml trunk/jameleon-core/tst/xml/framework/assertNotNullFail.xml trunk/jameleon-core/tst/xml/framework/assertNotNullPass.xml trunk/jameleon-core/tst/xml/framework/assertTrueFail.xml trunk/jameleon-core/tst/xml/framework/assertTruePass.xml trunk/jameleon-core/tst/xml/framework/csvTagCountRow.xml trunk/jameleon-core/tst/xml/framework/csvTagCountRow2.xml trunk/jameleon-core/tst/xml/framework/csv_file_name.xml trunk/jameleon-core/tst/xml/framework/csv_file_not_found_disabled.xml trunk/jameleon-core/tst/xml/framework/csv_file_not_found_enabled_csv_tag.xml trunk/jameleon-core/tst/xml/framework/csv_file_not_found_enabled_tc_tag.xml trunk/jameleon-core/tst/xml/framework/csv_not_cleaning_up_old_variables_previous_row.xml trunk/jameleon-core/tst/xml/framework/csv_tag_csv_comments.xml trunk/jameleon-core/tst/xml/framework/csv_test_failure_too_many_failures_count_row.xml trunk/jameleon-core/tst/xml/framework/csv_test_failure_too_many_failures_no_count_row.xml trunk/jameleon-core/tst/xml/framework/csv_value_substitute.xml trunk/jameleon-core/tst/xml/framework/dataDrivableMapVariable.xml trunk/jameleon-core/tst/xml/framework/exceptionExpected.xml trunk/jameleon-core/tst/xml/framework/exceptionNotExpected.xml trunk/jameleon-core/tst/xml/framework/failure_inside_nested_csv_tag.xml trunk/jameleon-core/tst/xml/framework/failure_outside_csv_tag.xml trunk/jameleon-core/tst/xml/framework/iterateTagTest.xml trunk/jameleon-core/tst/xml/framework/jameleon_test_case_test.xml trunk/jameleon-core/tst/xml/framework/jameleon_test_case_test_failure.xml trunk/jameleon-core/tst/xml/framework/map_variable_from_variable_to_variable_csv.xml trunk/jameleon-core/tst/xml/framework/max_execution_time_exceeded.xml trunk/jameleon-core/tst/xml/framework/max_execution_time_not_exceeded.xml trunk/jameleon-core/tst/xml/framework/nestedCsvTag.xml trunk/jameleon-core/tst/xml/framework/no_app_in_application_properties.xml trunk/jameleon-core/tst/xml/framework/no_test_environment.xml trunk/jameleon-core/tst/xml/framework/passVar.xml trunk/jameleon-core/tst/xml/framework/postcondition.xml trunk/jameleon-core/tst/xml/framework/postconditionTag.xml trunk/jameleon-core/tst/xml/framework/postconditionTagSessionTag.xml trunk/jameleon-core/tst/xml/framework/postconditionWithCsvCountRow.xml trunk/jameleon-core/tst/xml/framework/postconditionWithCsvNoCountRow.xml trunk/jameleon-core/tst/xml/framework/postconditionWithPrecondition.xml trunk/jameleon-core/tst/xml/framework/precondition.xml trunk/jameleon-core/tst/xml/framework/preconditionTag.xml trunk/jameleon-core/tst/xml/framework/sessionDelay.xml trunk/jameleon-core/tst/xml/framework/skipIfOrganization.xml trunk/jameleon-core/tst/xml/framework/skipIfTest.xml trunk/jameleon-core/tst/xml/framework/skipIfTestAndOrganization.xml trunk/jameleon-core/tst/xml/framework/sqlTagCountRowFalse.xml trunk/jameleon-core/tst/xml/framework/sqlTagCountRowTrue.xml trunk/jameleon-core/tst/xml/framework/sql_update_tag_failure.xml trunk/jameleon-core/tst/xml/framework/sql_update_tag_success.xml trunk/jameleon-core/tst/xml/framework/subVars.xml trunk/jameleon-core/tst/xml/framework/testNameFromFileName.xml trunk/jameleon-core/tst/xml/framework/test_case_csv_comments.xml trunk/jameleon-core/tst/xml/framework/unrecognizedTagInDataDrivableTag.xml trunk/jameleon-core/tst/xml/framework/unrecognizedTagInSessionTag.xml trunk/jameleon-core/tst/xml/framework/unrecognizedTagInTestCaseTag.xml trunk/jameleon-core/xdocs/antTasks.xml trunk/jameleon-core/xdocs/dataDriving.xml trunk/jameleon-core/xdocs/functionPoints.xml trunk/jameleon-core/xdocs/getting-started/debuggingTestScripts.xml trunk/jameleon-core/xdocs/getting-started/documentingTestScripts.xml trunk/jameleon-core/xdocs/getting-started/executingTestScriptsInGUI.xml trunk/jameleon-core/xdocs/getting-started/firstTestScript.xml trunk/jameleon-core/xdocs/getting-started/installingPlugins.xml trunk/jameleon-core/xdocs/globalSettings.xml trunk/jameleon-core/xdocs/index.xml trunk/jameleon-core/xdocs/install.xml trunk/jameleon-core/xdocs/junit-plugin.xml trunk/jameleon-core/xdocs/navigation.xml trunk/jameleon-core/xdocs/sessionTag.xml trunk/jameleon-core/xdocs/testCaseTag.xml trunk/jameleon-core/xdocs/xmlBasics.xml Added Paths: ----------- trunk/jameleon-core/etc/test/too_many_values.csv trunk/jameleon-core/lib/commons-collections-3.2.jar trunk/jameleon-core/lib/commons-logging-1.1.jar trunk/jameleon-core/lib/dom4j-1.6.1.jar trunk/jameleon-core/lib/jaxen-1.1-beta-11.jar trunk/jameleon-core/lib/log4j-1.2.14.jar trunk/jameleon-core/lib/mac/ trunk/jameleon-core/lib/mac/jdic_stub.jar trunk/jameleon-core/lib/mac/ppc/ trunk/jameleon-core/lib/mac/ppc/libjdic.jnilib trunk/jameleon-core/lib/mac/ppc/libtray.jnilib trunk/jameleon-core/lib/sunos/sparc/libmozembed-solaris-gtk1.2.so trunk/jameleon-core/lib/sunos/sparc/mozembed-solaris-gtk1.2 trunk/jameleon-core/lib/sunos/x86/libtray.so trunk/jameleon-core/lib/xercesImpl-2.6.2.jar trunk/jameleon-core/lib/xmlParserAPIs-2.6.2.jar trunk/jameleon-core/res/jameleon-core-version.properties trunk/jameleon-core/res/syntaxReference.txt trunk/jameleon-core/src/java/net/sf/jameleon/TestScriptTag.java trunk/jameleon-core/src/java/net/sf/jameleon/TestSuiteTag.java trunk/jameleon-core/src/java/net/sf/jameleon/WaitTag.java trunk/jameleon-core/src/java/net/sf/jameleon/ant/GenSyntaxReferenceTask.java trunk/jameleon-core/src/java/net/sf/jameleon/ant/UpgradeTask.java trunk/jameleon-core/src/java/net/sf/jameleon/event/TestSuiteEvent.java trunk/jameleon-core/src/java/net/sf/jameleon/event/TestSuiteEventHandler.java trunk/jameleon-core/src/java/net/sf/jameleon/event/TestSuiteListener.java trunk/jameleon-core/src/java/net/sf/jameleon/exception/JameleonException.java trunk/jameleon-core/src/java/net/sf/jameleon/exception/JameleonScriptException.java trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonLayout.java trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/tags/AbstractAssertTag.java trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/tags/AssertNullTag.java trunk/jameleon-core/src/java/net/sf/jameleon/result/AbstractApplicationResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/CountableResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResultRecordable.java trunk/jameleon-core/src/java/net/sf/jameleon/result/FunctionResultRecordable.java trunk/jameleon-core/src/java/net/sf/jameleon/result/HasChildResults.java trunk/jameleon-core/src/java/net/sf/jameleon/result/JameleonTestResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/SessionResultRecordable.java trunk/jameleon-core/src/java/net/sf/jameleon/result/TestResultWithChildren.java trunk/jameleon-core/src/java/net/sf/jameleon/result/TestSuiteResult.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/AboutDialog.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/AbstractConfigPanel.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/BasicHtmlBrowser.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/ConfigDialog.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/EnvironmentConfigPanel.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/GeneralConfigPanel.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/SortableJTable.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/TableSorter.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/UIConfigPanel.java trunk/jameleon-core/src/java/net/sf/jameleon/util/GenSyntaxReference.java trunk/jameleon-core/src/java/net/sf/jameleon/util/X509TrustEverythingManager.java trunk/jameleon-core/src/test-suite/htmlunit-sourceforge.xml trunk/jameleon-core/src/test-suite/jameleon.conf trunk/jameleon-core/src/test-suite/upgrade.xml trunk/jameleon-core/tst/java/net/sf/jameleon/ExecuteTestCaseTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/TestScriptTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/TestSuiteTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/AbstractDataDrivableTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/MockDataDrivableTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/MockIterateTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/MockSqlTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/event/TestSuiteEventHandlerTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/event/TestSuiteEventTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/event/TestTestSuiteListener.java trunk/jameleon-core/tst/java/net/sf/jameleon/exception/JameleonExceptionTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/exception/JameleonScriptExceptionTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/function/FailingMockFunctionTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/MultipleAssertsExpectFailureTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/ThrowExceptionTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/UseParamTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/DataDrivableResultTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/JameleonTestResultTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/MockTestResultWithChildren.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestResultWithChildrenTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestSuiteResultTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/util/GenSyntaxReferenceTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/util/X509TrustEverythingManagerTest.java trunk/jameleon-core/tst/res/jameleon.conf trunk/jameleon-core/tst/res/jameleon.noFailureOnCSVFileNotFound trunk/jameleon-core/tst/res/jameleon.otherenv trunk/jameleon-core/tst/res/jameleon.unittest trunk/jameleon-core/tst/res/testCase01.xml trunk/jameleon-core/tst/res/testCase02.xml trunk/jameleon-core/tst/res/testXml.xml trunk/jameleon-core/tst/res/testXmlWithNamespaces.xml trunk/jameleon-core/tst/xml/acceptance/expectException.xml trunk/jameleon-core/tst/xml/acceptance/expectFailure.xml trunk/jameleon-core/tst/xml/acceptance/expectFailureMultipleTestsOneTag.xml trunk/jameleon-core/tst/xml/acceptance/ju-assert-null.xml trunk/jameleon-core/tst/xml/acceptance/paramsTag.xml trunk/jameleon-core/tst/xml/acceptance/testsuite.xml trunk/jameleon-core/tst/xml/framework/csv_tag_invalid_format.xml trunk/jameleon-core/tst/xml/framework/runtimeExceptionThrown.xml trunk/jameleon-core/tst/xml/framework/test_case_csv_invalid_format.xml trunk/jameleon-core/tst/xml/framework/test_case_use_csv_true.xml trunk/jameleon-core/xdocs/changes.xml trunk/jameleon-core/xdocs/faq.fml trunk/jameleon-core/xdocs/syntax-reference.fml Removed Paths: ------------- trunk/jameleon-core/lib/commons-collections-2.1.jar trunk/jameleon-core/lib/commons-logging-1.0.3.jar trunk/jameleon-core/lib/dom4j-1.5.2.jar trunk/jameleon-core/lib/jaxen-1.1-beta-4.jar trunk/jameleon-core/lib/log4j-1.2.8.jar trunk/jameleon-core/lib/mac/jdic_stub.jar trunk/jameleon-core/lib/mac/ppc/ trunk/jameleon-core/lib/mac/ppc/libjdic.jnilib trunk/jameleon-core/lib/mac/ppc/libtray.jnilib trunk/jameleon-core/lib/xerces-2.4.jar trunk/jameleon-core/lib/xml-apis-1.0.b2.jar trunk/jameleon-core/res/icons/notrun.gif trunk/jameleon-core/src/java/net/sf/jameleon/event/GenDocsTestCaseListener.java trunk/jameleon-core/src/java/net/sf/jameleon/exception/JameleonException.java trunk/jameleon-core/src/java/net/sf/jameleon/junit/ trunk/jameleon-core/src/java/net/sf/jameleon/result/TestResult.java trunk/jameleon-core/src/java/net/sf/jameleon/util/ContextVars.java trunk/jameleon-core/src/test-suite/Environment.properties trunk/jameleon-core/src/test-suite/jameleon-gui.properties trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestResultTest.java trunk/jameleon-core/tst/lib/jameleon-gui.properties trunk/jameleon-core/tst/res/Environment.properties trunk/jameleon-core/tst/res/Environment_noFailureOnCSVFileNotFound.properties trunk/jameleon-core/tst/res/Environment_unittest.properties trunk/jameleon-core/tst/res/OtherEnvironment.properties trunk/jameleon-core/tst/xml/framework/csv_not_cleaning_up_old_variables.xml trunk/jameleon-core/tst/xml/framework/no_tests_run.xml trunk/jameleon-core/tst/xml/framework/notRun.xml trunk/jameleon-core/tst/xml/framework/postconditionTagWithCsvCountRow.xml trunk/jameleon-core/xdocs/faq.xml trunk/jameleon-core/xdocs/syntax-reference.xml Property Changed: ---------------- trunk/jameleon-core/src/java/net/sf/jameleon/result/FunctionResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/SessionResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/TestCaseResult.java trunk/jameleon-core/tst/java/TestAll.java trunk/jameleon-core/tst/java/net/sf/jameleon/AbstractParamElementTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/CsvTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/DummyJameleonTagSupport.java trunk/jameleon-core/tst/java/net/sf/jameleon/DummyJameleonTagSupport2.java trunk/jameleon-core/tst/java/net/sf/jameleon/DummyJameleonTagSupport3.java trunk/jameleon-core/tst/java/net/sf/jameleon/DummyJameleonTagSupport4.java trunk/jameleon-core/tst/java/net/sf/jameleon/JameleonTagSupportTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/MockCsvTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/MockSessionTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/MockTestCaseTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/SessionTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/TempText.java trunk/jameleon-core/tst/java/net/sf/jameleon/TestCaseTagLibraryTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/TestCaseTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/ant/DummyTagAbstract.java trunk/jameleon-core/tst/java/net/sf/jameleon/ant/DummyTagEmptyTagName.java trunk/jameleon-core/tst/java/net/sf/jameleon/ant/DummyTagFullDocs.java trunk/jameleon-core/tst/java/net/sf/jameleon/ant/DummyTagInvalidType.java trunk/jameleon-core/tst/java/net/sf/jameleon/ant/DummyTagNoTagName.java trunk/jameleon-core/tst/java/net/sf/jameleon/ant/DummyTagOneTagName.java trunk/jameleon-core/tst/java/net/sf/jameleon/ant/DummyTagTwoTagNames.java trunk/jameleon-core/tst/java/net/sf/jameleon/ant/JameleonXDocletTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/AttributeTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Dummy1.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Dummy2.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Dummy2Sub.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Dummy3.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Dummy4.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/DummyWithApplication.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/DummyWithApplications.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/FunctionalPointTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Javadoc2BeanTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/MatchingTextHelperTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/SessionTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/TestCaseTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/CollectionDataDriverTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/CsvDataDriverTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/DataExecuterTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/IterateTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/SqlDataDriverTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/SqlTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/SqlTestTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/event/DataDrivableEventHandlerTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/event/DataDrivableEventTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/event/FunctionEventHandlerTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/event/FunctionEventTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/event/TestCaseEventHandlerTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/event/TestCaseEventTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/event/TestFunctionListener.java trunk/jameleon-core/tst/java/net/sf/jameleon/event/TestTestCaseListener.java trunk/jameleon-core/tst/java/net/sf/jameleon/exception/JameleonTagExceptionTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/function/AttributeBrokerTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/function/ContextHelperTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/function/DummyTagAttributable.java trunk/jameleon-core/tst/java/net/sf/jameleon/function/FunctionTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/function/MockFunctionTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/launch/JameleonLauncherTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/BrokeredAttributesTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/FunctionWithParamsTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/SimpleFunction.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/SimpleFunctionCompareTwoVars.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/SimpleFunctionWithTwoVars.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/TestAssertLevelTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/TestListSizeTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/plugin/junit/TestSessionTagBeginSession.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/FunctionResultTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/SessionResultTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestCaseResultTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/taglet/AbstractJameleonTagletTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/taglet/MockJameleonTaglet.java trunk/jameleon-core/tst/java/net/sf/jameleon/ui/Dummy1.java trunk/jameleon-core/tst/java/net/sf/jameleon/ui/Dummy1Sub.java trunk/jameleon-core/tst/java/net/sf/jameleon/ui/FunctionalPointTreeTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/util/AssertLevelTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/util/ConfiguratorTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/util/InstanceSerializerTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/util/JameleonUtilityTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/util/StateStorerTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/util/SupportedTagsTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/util/XMLHelperTest.java trunk/jameleon-core/tst/res/Applications.properties trunk/jameleon-core/tst/res/appName.properties trunk/jameleon-core/tst/res/dev-Applications.properties trunk/jameleon-core/tst/res/plugin1.properties trunk/jameleon-core/tst/res/plugin2.properties trunk/jameleon-core/tst/res/plugin3.properties trunk/jameleon-core/tst/res/plugins-Test.properties trunk/jameleon-core/tst/res/test-Applications.properties trunk/jameleon-core/tst/res/test-custom-tags.properties trunk/jameleon-core/tst/res/test-jameleon-tags.properties trunk/jameleon-core/tst/res/test-tags.properties trunk/jameleon-core/tst/xml/acceptance/appNamePropertiesNoApplicationsProperties.xml trunk/jameleon-core/tst/xml/acceptance/baseDir.xml trunk/jameleon-core/tst/xml/acceptance/brokeredAttributes.xml trunk/jameleon-core/tst/xml/acceptance/csvSeparatorValue.xml trunk/jameleon-core/tst/xml/acceptance/csv_nested_param_tag.xml trunk/jameleon-core/tst/xml/acceptance/csv_nested_param_value_tag.xml trunk/jameleon-core/tst/xml/acceptance/csv_null_value.xml trunk/jameleon-core/tst/xml/acceptance/fineGrainedTests.xml trunk/jameleon-core/tst/xml/acceptance/mapVariableDecodeXmToText.xml trunk/jameleon-core/tst/xml/acceptance/mapVariableFromCsvFile.xml trunk/jameleon-core/tst/xml/acceptance/mapVariableFromPropertiesFile.xml trunk/jameleon-core/tst/xml/acceptance/mapVariableFromVariableValue.xml trunk/jameleon-core/tst/xml/acceptance/mapVariableFromVariableValues.xml trunk/jameleon-core/tst/xml/acceptance/mapVariableFromVariableValuesOutsideFP.xml trunk/jameleon-core/tst/xml/acceptance/nested_csv_substitute_variable_values.xml trunk/jameleon-core/tst/xml/acceptance/propertiesFileVariable.xml trunk/jameleon-core/tst/xml/acceptance/propertiesFileVariableWithOrg.xml trunk/jameleon-core/tst/xml/acceptance/propsName.xml trunk/jameleon-core/tst/xml/acceptance/testcaseTagCsvDir.xml trunk/jameleon-core/tst/xml/acceptance/utf-8.xml trunk/jameleon-core/tst/xml/antTestScript.xml trunk/jameleon-core/tst/xml/framework/assertEqualsFail.xml trunk/jameleon-core/tst/xml/framework/assertEqualsPass.xml trunk/jameleon-core/tst/xml/framework/assertGreaterThanAcceptance.xml trunk/jameleon-core/tst/xml/framework/assertGreaterThanFunction.xml trunk/jameleon-core/tst/xml/framework/assertGreaterThanRegression.xml trunk/jameleon-core/tst/xml/framework/assertGreaterThanSmoke.xml trunk/jameleon-core/tst/xml/framework/assertNotNullFail.xml trunk/jameleon-core/tst/xml/framework/assertNotNullPass.xml trunk/jameleon-core/tst/xml/framework/assertTrueFail.xml trunk/jameleon-core/tst/xml/framework/assertTruePass.xml trunk/jameleon-core/tst/xml/framework/csvTagCountRow.xml trunk/jameleon-core/tst/xml/framework/csvTagCountRow2.xml trunk/jameleon-core/tst/xml/framework/csv_file_name.xml trunk/jameleon-core/tst/xml/framework/csv_file_not_found_disabled.xml trunk/jameleon-core/tst/xml/framework/csv_file_not_found_enabled_csv_tag.xml trunk/jameleon-core/tst/xml/framework/csv_file_not_found_enabled_tc_tag.xml trunk/jameleon-core/tst/xml/framework/csv_not_cleaning_up_old_variables_previous_row.xml trunk/jameleon-core/tst/xml/framework/csv_tag_csv_comments.xml trunk/jameleon-core/tst/xml/framework/csv_test_failure_too_many_failures_count_row.xml trunk/jameleon-core/tst/xml/framework/csv_test_failure_too_many_failures_no_count_row.xml trunk/jameleon-core/tst/xml/framework/csv_value_substitute.xml trunk/jameleon-core/tst/xml/framework/dataDrivableMapVariable.xml trunk/jameleon-core/tst/xml/framework/exceptionExpected.xml trunk/jameleon-core/tst/xml/framework/exceptionNotExpected.xml trunk/jameleon-core/tst/xml/framework/failure_inside_nested_csv_tag.xml trunk/jameleon-core/tst/xml/framework/failure_outside_csv_tag.xml trunk/jameleon-core/tst/xml/framework/iterateTagTest.xml trunk/jameleon-core/tst/xml/framework/jameleon_test_case_test.xml trunk/jameleon-core/tst/xml/framework/jameleon_test_case_test_failure.xml trunk/jameleon-core/tst/xml/framework/map_variable_from_variable_to_variable_csv.xml trunk/jameleon-core/tst/xml/framework/max_execution_time_exceeded.xml trunk/jameleon-core/tst/xml/framework/max_execution_time_not_exceeded.xml trunk/jameleon-core/tst/xml/framework/nestedCsvTag.xml trunk/jameleon-core/tst/xml/framework/no_app_in_application_properties.xml trunk/jameleon-core/tst/xml/framework/no_test_environment.xml trunk/jameleon-core/tst/xml/framework/passVar.xml trunk/jameleon-core/tst/xml/framework/postcondition.xml trunk/jameleon-core/tst/xml/framework/postconditionTag.xml trunk/jameleon-core/tst/xml/framework/postconditionTagSessionTag.xml trunk/jameleon-core/tst/xml/framework/postconditionWithCsvCountRow.xml trunk/jameleon-core/tst/xml/framework/postconditionWithCsvNoCountRow.xml trunk/jameleon-core/tst/xml/framework/postconditionWithPrecondition.xml trunk/jameleon-core/tst/xml/framework/precondition.xml trunk/jameleon-core/tst/xml/framework/preconditionTag.xml trunk/jameleon-core/tst/xml/framework/sessionDelay.xml trunk/jameleon-core/tst/xml/framework/skipIfOrganization.xml trunk/jameleon-core/tst/xml/framework/skipIfTest.xml trunk/jameleon-core/tst/xml/framework/skipIfTestAndOrganization.xml trunk/jameleon-core/tst/xml/framework/sqlTagCountRowFalse.xml trunk/jameleon-core/tst/xml/framework/sqlTagCountRowTrue.xml trunk/jameleon-core/tst/xml/framework/sql_update_tag_failure.xml trunk/jameleon-core/tst/xml/framework/sql_update_tag_success.xml trunk/jameleon-core/tst/xml/framework/subVars.xml trunk/jameleon-core/tst/xml/framework/testNameFromFileName.xml trunk/jameleon-core/tst/xml/framework/test_case_csv_comments.xml trunk/jameleon-core/tst/xml/framework/unrecognizedTagInDataDrivableTag.xml trunk/jameleon-core/tst/xml/framework/unrecognizedTagInSessionTag.xml trunk/jameleon-core/tst/xml/framework/unrecognizedTagInTestCaseTag.xml Modified: trunk/jameleon-core/README.txt =================================================================== --- trunk/jameleon-core/README.txt 2006-11-12 15:43:34 UTC (rev 1184) +++ trunk/jameleon-core/README.txt 2006-11-12 18:18:07 UTC (rev 1185) @@ -2,7 +2,7 @@ # LICENSE # ############################################################################ # Jameleon - An automation testing tool.. # -# Copyright (C) 2003 Christian W. Hargraves (en...@ho...) # +# Copyright (C) 2003-2006 Christian W. Hargraves (en...@ho...) # # # # This library is free software; you can redistribute it and/or # # modify it under the terms of the GNU Lesser General Public # @@ -50,15 +50,14 @@ have the supported version of Ant installed to build. The following libraries are used by the libraries listed above. -commons-beanutils-1.6.1.jar +commons-beanutils-1.7.0.jar commons-cli-1.0.jar -commons-collections-2.1.jar -commons-jexl-1.0-beta-1.jar -commons-logging-api.jar -dom4j.jar +commons-collections-3.1.jar +commons-jexl-1.0.jar +commons-logging-1.0.4.jar +dom4j-1.5.2.jar hsqldb.jar -- Used only for unit tests log4j-1.2.8.jar -- This EXACT file must be used for reporting and logging to work correctly. -nekohtml.jar -xerces-2.2.1.jar -xjavadoc-1.0.2.jar +xerces-2.4.jar +xjavadoc-1.5-snapshot.jar xml-apis-1.0.b2.jar Modified: trunk/jameleon-core/build.properties =================================================================== --- trunk/jameleon-core/build.properties 2006-11-12 15:43:34 UTC (rev 1184) +++ trunk/jameleon-core/build.properties 2006-11-12 18:18:07 UTC (rev 1185) @@ -4,6 +4,6 @@ lib.dir=lib src.dir=src/java tst.dir=tst -version=3.2.2 -test.suite.version=3.2.2 -start.date=23 April 2006 +version=3.3-M3 +test.suite.version=3.3-M3 +start.date=11 November 2006 Modified: trunk/jameleon-core/build.xml =================================================================== --- trunk/jameleon-core/build.xml 2006-11-12 15:43:34 UTC (rev 1184) +++ trunk/jameleon-core/build.xml 2006-11-12 18:18:07 UTC (rev 1185) @@ -1,7 +1,9 @@ <?xml version="1.0"?> <!-- Jameleon - An automation testing tool.. - Copyright (C) 2003-2006 Christian W. Hargraves (en...@ho...) This library is free software; you can redistribute it and/or + Copyright (C) 2003-2006 Christian W. Hargraves (en...@ho...) + + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. @@ -23,20 +25,20 @@ <property name="htdocs.baseDir" value="htdocs" /> <property name="jameleon.core" value="true"/> - <target name="acceptance" depends="init.taskdefs"> + <target name="acceptance" depends="init.taskdefs, copyJameleonConf"> <delete dir="tst/_tmp"/> - <jmln-test debug="true" printTestSuiteSummary="false"> + <jmln-test debug="true" printTestSuiteSummary="false" throwExceptionOnFailure="false"> <fileset dir="tst/xml/acceptance"> <include name="*.xml"/> </fileset> </jmln-test> - <jmln-test debug="true" printTestSuiteSummary="false"> + <jmln-test debug="true" printTestSuiteSummary="false" throwExceptionOnFailure="false"> <fileset dir="tst/xml/framework"> <include name="passVar.xml"/> </fileset> <variable name="message" value="hello"/> </jmln-test> - <jmln-test debug="true" printTestSuiteSummary="true"> + <jmln-test debug="true"> <fileset dir="tst/xml/"> <include name="antTestScript.xml"/> </fileset> @@ -48,7 +50,7 @@ <target name="test.ant.task" depends="init.taskdefs" description="Executes a script using the testEnvironment and organization"> </target> - <target name="run.gui" description="Runs the GUI"> + <target name="run.gui" depends="copyJameleonConf" description="Runs the GUI"> <java classname="net.sf.jameleon.ui.JameleonUI" classpathref="gui.classpath" fork="true"/> @@ -56,34 +58,71 @@ <!-- PACKAGING TARGETS --> <target name="package.releases" description="creates a src, bin and tutorial zip file" - depends="package.release.src, package.release.bin, package.test-suite"/> + depends="package.release.src, package.release.bin, package.test-suite, package.htdocs"> + <antcall target="copy.zip.files"> + <param name="plugin" value="jameleon-core"/> + </antcall> + </target> + <target name="copy.zip.files"> + <copy todir="target"> + <fileset dir="../${plugin}"> + <include name="*.zip"/> + </fileset> + </copy> + </target> + + <target name="build.plugin"> + <ant dir="../${plugin}" antfile="../${plugin}/build.xml" target="package.release.src" inheritAll="false"/> + <ant dir="../${plugin}" antfile="../${plugin}/build.xml" inheritAll="false"/> + <ant dir="../${plugin}" antfile="../${plugin}/build.xml" target="package.release.bin" inheritAll="false"/> + <antcall target="copy.zip.files"> + <param name="plugin" value="${plugin}"/> + </antcall> + </target> + + <target name="build.htmlunit" description="builds the htmlunit-plugin"> + <antcall target="build.plugin"> + <param name="plugin" value="htmlunit-plugin"/> + </antcall> + </target> + <target name="build.httpunit" description="builds the httpunit-plugin"> - <ant antfile="../httpunit-plugin/build.xml" target="package.release.src" inheritAll="false"/> - <ant antfile="../httpunit-plugin/build.xml" inheritAll="false"/> - <ant antfile="../httpunit-plugin/build.xml" target="package.release.bin" inheritAll="false"/> + <antcall target="build.plugin"> + <param name="plugin" value="httpunit-plugin"/> + </antcall> </target> <target name="build.jagacy" description="builds the jagacy-plugin"> - <ant antfile="../jagacy-plugin/build.xml" target="package.release.src" inheritAll="false"/> - <ant antfile="../jagacy-plugin/build.xml" inheritAll="false"/> - <ant antfile="../jagacy-plugin/build.xml" target="package.release.bin" inheritAll="false"/> + <antcall target="build.plugin"> + <param name="plugin" value="jagacy-plugin"/> + </antcall> </target> - <target name="build.jiffie" description="builds the jiffe-plugin"> - <ant antfile="../jiffie-plugin/build.xml" target="package.release.src" inheritAll="false"/> - <ant antfile="../jiffie-plugin/build.xml" inheritAll="false"/> - <ant antfile="../jiffie-plugin/build.xml" target="package.release.bin" inheritAll="false"/> + <target name="build.jiffie" description="builds the jiffie-plugin"> + <antcall target="build.plugin"> + <param name="plugin" value="jiffie-plugin"/> + </antcall> </target> <target name="build.jwebunit" description="builds the jwebunit-plugin"> - <ant antfile="../jwebunit-plugin/build.xml" target="package.release.src" inheritAll="false"/> - <ant antfile="../jwebunit-plugin/build.xml" inheritAll="false"/> - <ant antfile="../jwebunit-plugin/build.xml" target="package.release.bin" inheritAll="false"/> + <antcall target="build.plugin"> + <param name="plugin" value="jwebunit-plugin"/> + </antcall> </target> - <target name="build.plugins" depends="build.httpunit, build.jagacy, build.jiffie, build.jwebunit"/> + <target name="build.selenium" description="builds the selenium-plugin"> + <antcall target="build.plugin"> + <param name="plugin" value="selenium-plugin"/> + </antcall> + </target> + <target name="build.plugins" depends="build.htmlunit, build.httpunit, build.jagacy, build.jiffie, build.jwebunit"/> + + <target name="clean.htmlunit" description="cleans the htmlunit-plugin"> + <ant antfile="../htmlunit-plugin/build.xml" target="clean" inheritAll="false"/> + </target> + <target name="clean.httpunit" description="cleans the httpunit-plugin"> <ant antfile="../httpunit-plugin/build.xml" target="clean" inheritAll="false"/> </target> @@ -100,16 +139,45 @@ <ant antfile="../jwebunit-plugin/build.xml" target="clean" inheritAll="false"/> </target> - <target name="clean.plugins" depends="clean.httpunit, clean.jagacy, clean.jiffie, clean.jwebunit"/> + <target name="clean.selenium" description="cleans the jwebunit-plugin"> + <ant antfile="../selenium-plugin/build.xml" target="clean" inheritAll="false"/> + </target> - <target name="package.htdocs" description="creates a src release"> + <target name="clean.plugins" depends="clean.htmlunit, clean.httpunit, clean.jagacy, clean.jiffie, clean.jwebunit"/> + + <target name="maven.site" depends="package.test-suite" description="builds site docs"> + <exec dir="." executable="maven.bat"> + <arg line="site"/> + </exec> + <exec dir="../htmlunit-plugin" executable="maven.bat"> + <arg line="site"/> + </exec> + <exec dir="../httpunit-plugin" executable="maven.bat"> + <arg line="site"/> + </exec> + <exec dir="../jagacy-plugin" executable="maven.bat"> + <arg line="site"/> + </exec> + <exec dir="../jiffie-plugin" executable="maven.bat"> + <arg line="site"/> + </exec> + <exec dir="../jwebunit-plugin" executable="maven.bat"> + <arg line="site"/> + </exec> + </target> + + <target name="package.htdocs" depends="maven.site" description="creates a src release"> <property name="docs" value="target/docs"/> <zip destfile="htdocs.zip"> <zipfileset dir="${docs}" prefix="htdocs"/> + <zipfileset dir="../htmlunit-plugin/${docs}" prefix="htdocs/htmlunit-plugin"/> <zipfileset dir="../httpunit-plugin/${docs}" prefix="htdocs/httpunit-plugin"/> <zipfileset dir="../jagacy-plugin/${docs}" prefix="htdocs/jagacy-plugin"/> <zipfileset dir="../jiffie-plugin/${docs}" prefix="htdocs/jiffie-plugin"/> <zipfileset dir="../jwebunit-plugin/${docs}" prefix="htdocs/jwebunit-plugin"/> +<!-- + <zipfileset dir="../selenium-plugin/${docs}" prefix="htdocs/selenium-plugin"/> + --> </zip> </target> @@ -128,13 +196,19 @@ <include name="jameleon-launcher.jar"/> </zipfileset> <zipfileset dir="lib" prefix="jameleon-test-suite/lib" filemode="755"> - <exclude name="jaxen*.jar"/> <include name="**"/> </zipfileset> + <zipfileset dir="../htmlunit-plugin/${dist.dir}" prefix="jameleon-test-suite/lib"> + <include name="htmlunit-plugin.jar"/> + </zipfileset> + <zipfileset dir="../htmlunit-plugin/lib" prefix="jameleon-test-suite/lib"> + <include name="*.jar"/> + </zipfileset> <zipfileset dir="../httpunit-plugin/${dist.dir}" prefix="jameleon-test-suite/lib"> <include name="httpunit-plugin.jar"/> </zipfileset> <zipfileset dir="../httpunit-plugin/lib" prefix="jameleon-test-suite/lib"> + <exclude name="js.jar"/> <include name="*.jar"/> </zipfileset> <zipfileset dir="../jagacy-plugin/${dist.dir}" prefix="jameleon-test-suite/lib"> @@ -147,6 +221,7 @@ <include name="jiffie-plugin.jar"/> </zipfileset> <zipfileset dir="../jiffie-plugin/lib" prefix="jameleon-test-suite/lib"> + <exclude name="jaxen*.jar"/> <include name="*.jar"/> </zipfileset> <zipfileset dir="../jiffie-plugin/lib" prefix="jameleon-test-suite/lib" filemode="755"> @@ -160,7 +235,9 @@ </zipfileset> <zipfileset dir="src/test-suite" prefix="jameleon-test-suite"> <include name="build.xml"/> + <include name="upgrade.xml"/> <include name="build.properties"/> + <include name="jameleon.conf"/> </zipfileset> <zipfileset dir="src/test-suite" prefix="jameleon-test-suite" filemode="755"> <include name="build.sh"/> @@ -168,12 +245,6 @@ <include name="jameleon.sh"/> <include name="jameleon.bat"/> </zipfileset> - <zipfileset dir="src/test-suite" prefix="jameleon-test-suite/lib"> - <include name="jameleon-gui.properties"/> - </zipfileset> - <zipfileset dir="src/test-suite" prefix="jameleon-test-suite/res"> - <include name="Environment.properties"/> - </zipfileset> <zipfileset dir="src/test-suite" prefix="jameleon-test-suite"> <include name="README.txt"/> </zipfileset> @@ -184,6 +255,9 @@ <zipfileset dir="" prefix="jameleon-test-suite/data"> <exclude name="**/*"/> </zipfileset> + <zipfileset dir="" prefix="jameleon-test-suite/res"> + <exclude name="**/*"/> + </zipfileset> <zipfileset dir="" prefix="jameleon-test-suite/src/java"> <exclude name="**/*"/> </zipfileset> Modified: trunk/jameleon-core/docs/Jameleon_manual.odt =================================================================== (Binary files differ) Modified: trunk/jameleon-core/etc/test/passingAndFailingRows.csv =================================================================== --- trunk/jameleon-core/etc/test/passingAndFailingRows.csv 2006-11-12 15:43:34 UTC (rev 1184) +++ trunk/jameleon-core/etc/test/passingAndFailingRows.csv 2006-11-12 18:18:07 UTC (rev 1185) @@ -2,3 +2,4 @@ true false true +false Copied: trunk/jameleon-core/etc/test/too_many_values.csv (from rev 1172, branches/jameleon-core-results-refactor/jameleon-core/etc/test/too_many_values.csv) =================================================================== --- trunk/jameleon-core/etc/test/too_many_values.csv (rev 0) +++ trunk/jameleon-core/etc/test/too_many_values.csv 2006-11-12 18:18:07 UTC (rev 1185) @@ -0,0 +1,2 @@ +one +two,three Deleted: trunk/jameleon-core/lib/commons-collections-2.1.jar =================================================================== (Binary files differ) Copied: trunk/jameleon-core/lib/commons-collections-3.2.jar (from rev 1172, branches/jameleon-core-results-refactor/jameleon-core/lib/commons-collections-3.2.jar) =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/commons-jelly-1.0.jar =================================================================== (Binary files differ) Deleted: trunk/jameleon-core/lib/commons-logging-1.0.3.jar =================================================================== (Binary files differ) Copied: trunk/jameleon-core/lib/commons-logging-1.1.jar (from rev 1172, branches/jameleon-core-results-refactor/jameleon-core/lib/commons-logging-1.1.jar) =================================================================== (Binary files differ) Deleted: trunk/jameleon-core/lib/dom4j-1.5.2.jar =================================================================== (Binary files differ) Copied: trunk/jameleon-core/lib/dom4j-1.6.1.jar (from rev 1172, branches/jameleon-core-results-refactor/jameleon-core/lib/dom4j-1.6.1.jar) =================================================================== (Binary files differ) Copied: trunk/jameleon-core/lib/jaxen-1.1-beta-11.jar (from rev 1172, branches/jameleon-core-results-refactor/jameleon-core/lib/jaxen-1.1-beta-11.jar) =================================================================== (Binary files differ) Deleted: trunk/jameleon-core/lib/jaxen-1.1-beta-4.jar =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/jdic.jar =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/junit.jar =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/linux/jdic_stub.jar =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/linux/x86/libmozembed-linux-gtk1.2.so =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/linux/x86/libmozembed-linux-gtk2.so =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/linux/x86/mozembed-linux-gtk1.2 =================================================================== (Binary files differ) Copied: trunk/jameleon-core/lib/log4j-1.2.14.jar (from rev 1172, branches/jameleon-core-results-refactor/jameleon-core/lib/log4j-1.2.14.jar) =================================================================== (Binary files differ) Deleted: trunk/jameleon-core/lib/log4j-1.2.8.jar =================================================================== (Binary files differ) Copied: trunk/jameleon-core/lib/mac (from rev 1172, branches/jameleon-core-results-refactor/jameleon-core/lib/mac) Deleted: trunk/jameleon-core/lib/mac/jdic_stub.jar =================================================================== (Binary files differ) Copied: trunk/jameleon-core/lib/mac/jdic_stub.jar (from rev 1172, branches/jameleon-core-results-refactor/jameleon-core/lib/mac/jdic_stub.jar) =================================================================== (Binary files differ) Copied: trunk/jameleon-core/lib/mac/ppc (from rev 1172, branches/jameleon-core-results-refactor/jameleon-core/lib/mac/ppc) Deleted: trunk/jameleon-core/lib/mac/ppc/libjdic.jnilib =================================================================== (Binary files differ) Copied: trunk/jameleon-core/lib/mac/ppc/libjdic.jnilib (from rev 1172, branches/jameleon-core-results-refactor/jameleon-core/lib/mac/ppc/libjdic.jnilib) =================================================================== (Binary files differ) Deleted: trunk/jameleon-core/lib/mac/ppc/libtray.jnilib =================================================================== (Binary files differ) Copied: trunk/jameleon-core/lib/mac/ppc/libtray.jnilib (from rev 1172, branches/jameleon-core-results-refactor/jameleon-core/lib/mac/ppc/libtray.jnilib) =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/sunos/jdic_stub.jar =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/sunos/sparc/libjdic.so =================================================================== (Binary files differ) Copied: trunk/jameleon-core/lib/sunos/sparc/libmozembed-solaris-gtk1.2.so (from rev 1172, branches/jameleon-core-results-refactor/jameleon-core/lib/sunos/sparc/libmozembed-solaris-gtk1.2.so) =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/sunos/sparc/libmozembed-solaris-gtk2.so =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/sunos/sparc/libtray.so =================================================================== (Binary files differ) Copied: trunk/jameleon-core/lib/sunos/sparc/mozembed-solaris-gtk1.2 (from rev 1172, branches/jameleon-core-results-refactor/jameleon-core/lib/sunos/sparc/mozembed-solaris-gtk1.2) =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/sunos/sparc/mozembed-solaris-gtk2 =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/sunos/x86/libjdic.so =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/sunos/x86/libmozembed-solaris-gtk2.so =================================================================== (Binary files differ) Copied: trunk/jameleon-core/lib/sunos/x86/libtray.so (from rev 1172, branches/jameleon-core-results-refactor/jameleon-core/lib/sunos/x86/libtray.so) =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/sunos/x86/mozembed-solaris-gtk2 =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/windows/jdic_stub.jar =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/windows/x86/IeEmbed.exe =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/windows/x86/MozEmbed.exe =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/windows/x86/jdic.dll =================================================================== (Binary files differ) Modified: trunk/jameleon-core/lib/windows/x86/tray.dll =================================================================== (Binary files differ) Deleted: trunk/jameleon-core/lib/xerces-2.4.jar =================================================================== (Binary files differ) Copied: trunk/jameleon-core/lib/xercesImpl-2.6.2.jar (from rev 1172, branches/jameleon-core-results-refactor/jameleon-core/lib/xercesImpl-2.6.2.jar) =================================================================== (Binary files differ) Deleted: trunk/jameleon-core/lib/xml-apis-1.0.b2.jar =================================================================== (Binary files differ) Copied: trunk/jameleon-core/lib/xmlParserAPIs-2.6.2.jar (from rev 1172, branches/jameleon-core-results-refactor/jameleon-core/lib/xmlParserAPIs-2.6.2.jar) =================================================================== (Binary files differ) Modified: trunk/jameleon-core/project.properties =================================================================== --- trunk/jameleon-core/project.properties 2006-11-12 15:43:34 UTC (rev 1184) +++ trunk/jameleon-core/project.properties 2006-11-12 18:18:07 UTC (rev 1185) @@ -15,30 +15,24 @@ maven.jar.ant = ${lib.dir}/ant/ant.jar maven.jar.ant-launcher = ${lib.dir}/ant/ant-launcher.jar maven.jar.commons-beanutils = ${lib.dir}/commons-beanutils-1.7.0.jar -maven.jar.commons-cli = ${lib.dir}/commons-cli-1.0.jar -maven.jar.commons-collections = ${lib.dir}/commons-collections-2.1.jar -maven.jar.commons-jexl = ${lib.dir}/commons-jexl-1.0.jar -maven.jar.common... [truncated message content] |
From: <en...@us...> - 2006-11-13 17:43:39
|
Revision: 1199 http://svn.sourceforge.net/jameleon/?rev=1199&view=rev Author: engrean Date: 2006-11-13 09:43:14 -0800 (Mon, 13 Nov 2006) Log Message: ----------- Fixed Bug #1595771 - Code cleanup Modified Paths: -------------- trunk/jameleon-core/src/java/net/sf/jameleon/AbstractCsvTag.java trunk/jameleon-core/src/java/net/sf/jameleon/AbstractParamElementTag.java trunk/jameleon-core/src/java/net/sf/jameleon/ExecuteTestCase.java trunk/jameleon-core/src/java/net/sf/jameleon/JameleonTagSupport.java trunk/jameleon-core/src/java/net/sf/jameleon/Storable.java trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTagLibrary.java trunk/jameleon-core/src/java/net/sf/jameleon/TestScriptTag.java trunk/jameleon-core/src/java/net/sf/jameleon/WaitTag.java trunk/jameleon-core/src/java/net/sf/jameleon/ant/ExecuteTestCaseSeparateVMTask.java trunk/jameleon-core/src/java/net/sf/jameleon/ant/ExecuteTestCaseTask.java trunk/jameleon-core/src/java/net/sf/jameleon/ant/UpgradeTask.java trunk/jameleon-core/src/java/net/sf/jameleon/bean/FunctionalPoint.java trunk/jameleon-core/src/java/net/sf/jameleon/bean/Javadoc2Bean.java trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java trunk/jameleon-core/src/java/net/sf/jameleon/data/CollectionDataDriver.java trunk/jameleon-core/src/java/net/sf/jameleon/data/SqlDataDriver.java trunk/jameleon-core/src/java/net/sf/jameleon/function/AttributeBroker.java trunk/jameleon-core/src/java/net/sf/jameleon/function/FunctionTag.java trunk/jameleon-core/src/java/net/sf/jameleon/launch/JameleonLauncher.java trunk/jameleon-core/src/java/net/sf/jameleon/launch/JameleonMain.java trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonHTMLLayout.java trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonLayout.java trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonSimpleLayout.java trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonXMLLayout.java trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/ExecuteJameleonScriptTag.java trunk/jameleon-core/src/java/net/sf/jameleon/result/CountableResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/JameleonTestResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/TestCaseResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/TestResultWithChildren.java trunk/jameleon-core/src/java/net/sf/jameleon/sql/AbstractSqlTag.java trunk/jameleon-core/src/java/net/sf/jameleon/taglet/AbstractJameleonTaglet.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/AboutDialog.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/AbstractConfigPanel.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/BasicHtmlBrowser.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/ConfigDialog.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/DataDrivableDebugDialog.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/DebugDialog.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/FunctionalPointTree.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/JameleonUI.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/ProgressDialog.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/SortableJTable.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCaseDocsExecutor.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCasePane.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCaseResultsFrame.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCaseTree.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/UIConfigPanel.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/Utils.java trunk/jameleon-core/src/java/net/sf/jameleon/util/Configurator.java trunk/jameleon-core/src/java/net/sf/jameleon/util/InstanceSerializer.java trunk/jameleon-core/src/java/net/sf/jameleon/util/JameleonUtility.java trunk/jameleon-core/src/java/net/sf/jameleon/util/VelocityClasspathResourceLoader.java trunk/jameleon-core/src/java/net/sf/jameleon/util/XMLHelper.java Property Changed: ---------------- trunk/jameleon-core/ Property changes on: trunk/jameleon-core ___________________________________________________________________ Name: svn:ignore + .settings .classpath .project Modified: trunk/jameleon-core/src/java/net/sf/jameleon/AbstractCsvTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/AbstractCsvTag.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/AbstractCsvTag.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -18,14 +18,13 @@ */ package net.sf.jameleon; +import java.io.File; + +import net.sf.jameleon.data.AbstractFileDrivableTag; import net.sf.jameleon.data.CsvDataDriver; import net.sf.jameleon.data.DataDriver; -import net.sf.jameleon.data.AbstractFileDrivableTag; import net.sf.jameleon.util.Configurator; -import net.sf.jameleon.util.JameleonDefaultValues; -import java.io.File; - /** * This DataDrivable tag is an implementation of a CSV data source. */ Modified: trunk/jameleon-core/src/java/net/sf/jameleon/AbstractParamElementTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/AbstractParamElementTag.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/AbstractParamElementTag.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -20,9 +20,8 @@ import net.sf.jameleon.util.JameleonUtility; -import org.apache.commons.jelly.MissingAttributeException; -import org.apache.commons.jelly.Tag; import org.apache.commons.jelly.JellyTagException; +import org.apache.commons.jelly.MissingAttributeException; import org.apache.commons.jelly.TagSupport; import org.apache.commons.jelly.XMLOutput; Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ExecuteTestCase.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ExecuteTestCase.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ExecuteTestCase.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -156,8 +156,6 @@ } } } - Iterator it = exec.getFiles().iterator(); - long startTime = System.currentTimeMillis(); errMsg.append(exec.executeFiles()); try{ if ( errMsg.length() > 0 ) { Modified: trunk/jameleon-core/src/java/net/sf/jameleon/JameleonTagSupport.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/JameleonTagSupport.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/JameleonTagSupport.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -19,11 +19,7 @@ package net.sf.jameleon; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; import java.lang.reflect.Field; -import java.lang.reflect.Field; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; @@ -31,11 +27,6 @@ import java.util.Map; import java.util.Set; -import org.apache.commons.beanutils.BeanUtils; -import org.apache.commons.jelly.DynaTag; -import org.apache.commons.jelly.JellyTagException; -import org.apache.commons.jelly.TagSupport; - import net.sf.jameleon.bean.Attribute; import net.sf.jameleon.bean.FunctionalPoint; import net.sf.jameleon.exception.JameleonException; @@ -43,9 +34,12 @@ import net.sf.jameleon.function.Attributable; import net.sf.jameleon.function.AttributeBroker; import net.sf.jameleon.function.ContextHelper; -import net.sf.jameleon.util.InstanceSerializer; import net.sf.jameleon.util.JameleonUtility; +import org.apache.commons.beanutils.BeanUtils; +import org.apache.commons.jelly.DynaTag; +import org.apache.commons.jelly.JellyTagException; + /** * <p><code>JameleonTagSupport</code> is an implementation of DynaTag. This tag * throws the variable name as the XML attribute into the context. It then Modified: trunk/jameleon-core/src/java/net/sf/jameleon/Storable.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/Storable.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/Storable.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -18,7 +18,6 @@ */ package net.sf.jameleon; -import java.io.File; import java.io.IOException; /** Modified: trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -22,25 +22,21 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; -import java.util.*; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.PropertyResourceBundle; +import java.util.ResourceBundle; +import java.util.Set; -import org.apache.commons.beanutils.BeanUtils; -import org.apache.commons.jelly.JellyException; -import org.apache.commons.jelly.JellyTagException; -import org.apache.commons.jelly.LocationAware; -import org.apache.commons.jelly.MissingAttributeException; -import org.apache.commons.jelly.XMLOutput; -import org.apache.commons.jelly.expression.CompositeExpression; -import org.apache.commons.jelly.expression.Expression; -import org.apache.commons.jelly.expression.jexl.JexlExpressionFactory; -import org.apache.log4j.Logger; - import net.sf.jameleon.bean.TestCase; import net.sf.jameleon.data.DataDrivable; import net.sf.jameleon.event.TestCaseEventHandler; -import net.sf.jameleon.exception.JameleonException; import net.sf.jameleon.exception.JameleonScriptException; -import net.sf.jameleon.exception.JameleonTagException; import net.sf.jameleon.result.DataDrivableResult; import net.sf.jameleon.result.JameleonTestResult; import net.sf.jameleon.result.TestCaseResult; @@ -51,6 +47,17 @@ import net.sf.jameleon.util.StateStorer; import net.sf.jameleon.util.TestCaseDocsTransformer; +import org.apache.commons.beanutils.BeanUtils; +import org.apache.commons.jelly.JellyException; +import org.apache.commons.jelly.JellyTagException; +import org.apache.commons.jelly.LocationAware; +import org.apache.commons.jelly.MissingAttributeException; +import org.apache.commons.jelly.XMLOutput; +import org.apache.commons.jelly.expression.CompositeExpression; +import org.apache.commons.jelly.expression.Expression; +import org.apache.commons.jelly.expression.jexl.JexlExpressionFactory; +import org.apache.log4j.Logger; + /** * Used to encapsulate all the sessions and all other function points. * This tag does a lot of things behind the scenes. If the <code>useCSV</code> @@ -902,7 +909,7 @@ * Clean things up after the test case has been executed. */ public void tearDown(){ - Configurator.getInstance().clearInstance(); + Configurator.clearInstance(); Iterator it = keysSet.iterator(); while (it.hasNext()) { context.removeVariable((String)it.next()); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTagLibrary.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTagLibrary.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTagLibrary.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -21,17 +21,16 @@ import java.util.Iterator; import java.util.Map; -import org.apache.commons.jelly.JellyException; -import org.apache.commons.jelly.Tag; -import org.apache.commons.jelly.TagLibrary; -import org.apache.commons.jelly.impl.TagScript; -import org.xml.sax.Attributes; - import net.sf.jameleon.exception.JameleonException; import net.sf.jameleon.exception.JameleonTagException; import net.sf.jameleon.util.Configurator; import net.sf.jameleon.util.SupportedTags; +import org.apache.commons.jelly.JellyException; +import org.apache.commons.jelly.Tag; +import org.apache.commons.jelly.TagLibrary; +import org.xml.sax.Attributes; + /** * Registers the tag libraries based on what is set up in SupportedTags. * SupportedTags by default reads its configuration from jameleon.conf' plugins Modified: trunk/jameleon-core/src/java/net/sf/jameleon/TestScriptTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/TestScriptTag.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/TestScriptTag.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -24,10 +24,6 @@ import org.apache.commons.jelly.MissingAttributeException; import org.apache.commons.jelly.XMLOutput; -import net.sf.jameleon.event.TestSuiteEventHandler; -import net.sf.jameleon.event.TestSuiteListener; -import net.sf.jameleon.exception.JameleonScriptException; - /** * This is currently a tag meant to be nested inside the test-suite tag. * It represents one of the scripts to be included and executed the test-suite. Modified: trunk/jameleon-core/src/java/net/sf/jameleon/WaitTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/WaitTag.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/WaitTag.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -18,9 +18,8 @@ */ package net.sf.jameleon; -import org.apache.commons.jelly.MissingAttributeException; import org.apache.commons.jelly.JellyTagException; -import org.apache.commons.jelly.TagSupport; +import org.apache.commons.jelly.MissingAttributeException; import org.apache.commons.jelly.XMLOutput; /** Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ant/ExecuteTestCaseSeparateVMTask.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ant/ExecuteTestCaseSeparateVMTask.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ant/ExecuteTestCaseSeparateVMTask.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -57,7 +57,6 @@ private boolean failOnError = false; private boolean separateVmPerScript = false; private boolean append = false; - private boolean debug = false; private boolean printFooter = true; private Long timeout = null; @@ -75,18 +74,16 @@ validateOptions(); cmdl.setClassname("net.sf.jameleon.ExecuteTestCase"); if (dir == null || !dir.exists() || !dir.isDirectory()) { - dir = project.getBaseDir(); + dir = getProject().getBaseDir(); } - boolean failed = false; if (!printFooter) { cmdl.createArgument().setLine("false"); } for ( int i = 0; i < fileSets.size(); i++ ) { FileSet fs = ( FileSet ) fileSets.get( i ); - DirectoryScanner ds = fs.getDirectoryScanner( project ); + DirectoryScanner ds = fs.getDirectoryScanner( getProject() ); String[] files = ds.getIncludedFiles(); - File testcase = null; for (int j = 0; j < files.length; j++) { cmdl.createArgument().setLine(ds.getBasedir().getPath()+File.separator+files[j]); if (separateVmPerScript) { @@ -107,7 +104,7 @@ try { if ((err = executeJava()) != 0) { if (failOnError) { - throw new BuildException("Java returned: " + err, location); + throw new BuildException("Java returned: " + err, getLocation()); } else { log("Java Result: " + err, Project.MSG_ERR); } @@ -126,7 +123,6 @@ } public void setDebug(boolean debug){ - this.debug = debug; } public void setBaseDir(File dir){ @@ -235,7 +231,7 @@ * Adds a path to the classpath. */ public Path createClasspath() { - return cmdl.createClasspath(project).createPath(); + return cmdl.createClasspath(getProject()).createPath(); } /** @@ -427,14 +423,14 @@ System.out.flush(); System.err.flush(); } catch (IOException io) { - throw new BuildException(io, location); + throw new BuildException(io, getLocation()); } finally { if (outStream != null) { outStream.close(); } } } else { - exe.execute(project); + exe.execute(getProject()); } } @@ -455,14 +451,14 @@ createWatchdog()); } - exe.setAntRun(project); + exe.setAntRun(getProject()); if (dir == null) { - dir = project.getBaseDir(); + dir = getProject().getBaseDir(); } else if (!dir.exists() || !dir.isDirectory()) { throw new BuildException(dir.getAbsolutePath() + " is not a valid directory", - location); + getLocation()); } exe.setWorkingDirectory(dir); @@ -485,10 +481,10 @@ } return rc; } catch (IOException e) { - throw new BuildException(e, location); + throw new BuildException(e, getLocation()); } } catch (IOException io) { - throw new BuildException(io, location); + throw new BuildException(io, getLocation()); } finally { if (fos != null) { try {fos.close();} catch (IOException io) {} Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ant/ExecuteTestCaseTask.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ant/ExecuteTestCaseTask.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ant/ExecuteTestCaseTask.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -24,8 +24,6 @@ import java.util.List; import java.util.Map; -import javax.print.DocFlavor.STRING; - import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.Task; @@ -56,15 +54,13 @@ public final void execute() throws BuildException { validateOptions(); StringBuffer errMsg = new StringBuffer(); - boolean failed = false; ExecuteTestCase exec = new ExecuteTestCase(debug); exec.registerEventListeners(); setParametersInContext(exec.getContextVars()); for ( int i = 0; i < fileSets.size(); i++ ) { FileSet fs = ( FileSet ) fileSets.get( i ); - File dir = fs.getDir( project ); - DirectoryScanner ds = fs.getDirectoryScanner( project ); + DirectoryScanner ds = fs.getDirectoryScanner( getProject() ); String[] files = ds.getIncludedFiles(); File testcase = null; for (int j = 0; j < files.length; j++) { @@ -85,7 +81,7 @@ if ( errMsg.length() > 0 ) { if (throwExceptionOnFailure) { throw new BuildException(LB+"The following test cases failed:"+errMsg.toString()+ - "\n\n"+"See 'TestResults.xml' and 'TestResults.html' for more details on the failure(s)", location); + "\n\n"+"See 'TestResults.xml' and 'TestResults.html' for more details on the failure(s)", getLocation()); }else{ System.err.println(LB+"The following test cases failed:"+errMsg.toString()+ "\n\n"+"See 'TestResults.xml' and 'TestResults.html' for more details on the failure(s)"); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ant/UpgradeTask.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ant/UpgradeTask.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ant/UpgradeTask.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -113,7 +113,6 @@ } keys = cfg.getKeysStartingWith("classpath.file"); it = keys.iterator(); - int dirSize = entries; maxNum += keys.size(); for (; it.hasNext(); entries++){ key = (String)it.next(); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/bean/FunctionalPoint.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/bean/FunctionalPoint.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/bean/FunctionalPoint.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -16,12 +16,11 @@ */ package net.sf.jameleon.bean; -import java.util.HashMap; +import java.util.Iterator; import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; -import java.util.Iterator; import net.sf.jameleon.XMLable; import net.sf.jameleon.exception.JameleonException; Modified: trunk/jameleon-core/src/java/net/sf/jameleon/bean/Javadoc2Bean.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/bean/Javadoc2Bean.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/bean/Javadoc2Bean.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -174,8 +174,6 @@ protected void addDocsFromSerializedFP(FunctionalPoint fp, XClass clss){ FunctionalPoint serFp = null; - File sFile = null; - for (XClass superClass = clss; superClass != null && superClass.isA(isA); superClass = superClass.getSuperclass()) { if (! (superClass instanceof SourceClass)) { serFp = getFunctionalPointFromSerializedFile(superClass); @@ -302,10 +300,9 @@ } protected XClass getXClassWithTag(String tagName) throws FileNotFoundException{ - File sourceFile = null; String className = getClassNameFromTag(tagName); try { - sourceFile = getSourceFile(className); + getSourceFile(className); } catch (MissingResourceException mre) { throw new FileNotFoundException("File corresponding to "+tagName +" not found"); } @@ -315,9 +312,8 @@ } protected XClass getXClassWithClass(String className) throws FileNotFoundException{ - File sourceFile = null; try { - sourceFile = getSourceFile(className); + getSourceFile(className); } catch (MissingResourceException mre) { throw new FileNotFoundException("File corresponding to "+className +" not found"); } Modified: trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -26,20 +26,11 @@ import java.util.Map; import java.util.Set; -import org.apache.commons.jelly.JellyTagException; -import org.apache.commons.jelly.LocationAware; -import org.apache.commons.jelly.MissingAttributeException; -import org.apache.commons.jelly.XMLOutput; -import org.apache.log4j.Logger; - import net.sf.jameleon.JameleonTagSupport; -import net.sf.jameleon.LocationAwareTagSupport; import net.sf.jameleon.SessionTag; import net.sf.jameleon.TestCaseTag; import net.sf.jameleon.event.BreakPoint; import net.sf.jameleon.exception.JameleonScriptException; -import net.sf.jameleon.exception.JameleonTagException; -import net.sf.jameleon.result.CountableResult; import net.sf.jameleon.result.DataDrivableResult; import net.sf.jameleon.result.DataDrivableResultRecordable; import net.sf.jameleon.result.FunctionResult; @@ -49,6 +40,12 @@ import net.sf.jameleon.result.SessionResultRecordable; import net.sf.jameleon.util.StateStorer; +import org.apache.commons.jelly.JellyTagException; +import org.apache.commons.jelly.LocationAware; +import org.apache.commons.jelly.MissingAttributeException; +import org.apache.commons.jelly.XMLOutput; +import org.apache.log4j.Logger; + /** * This is a basic implementation of DataDrivable. This is data source * independent as possible for now. @@ -233,7 +230,6 @@ if (keys != null) { Iterator it = keys.keySet().iterator(); String oldKey,newKey; - Object value; while (it.hasNext()) { oldKey = (String) it.next(); newKey = (String) keys.get(oldKey); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/data/CollectionDataDriver.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/data/CollectionDataDriver.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/data/CollectionDataDriver.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -23,7 +23,6 @@ import java.util.Collection; import java.util.HashMap; import java.util.Iterator; -import java.util.LinkedList; import java.util.Map; /** Modified: trunk/jameleon-core/src/java/net/sf/jameleon/data/SqlDataDriver.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/data/SqlDataDriver.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/data/SqlDataDriver.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -18,9 +18,7 @@ */ package net.sf.jameleon.data; -import java.io.BufferedReader; import java.io.IOException; -import java.io.Reader; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; @@ -28,10 +26,8 @@ import java.sql.Statement; import java.sql.Timestamp; import java.sql.Types; -import java.text.DateFormat; import java.util.ArrayList; import java.util.HashMap; -import java.util.Iterator; import java.util.List; import java.util.Map; @@ -127,7 +123,7 @@ protected void registerJDBCDriver() throws IOException { try{ - getClass().forName(jdbcDriver).newInstance(); + Class.forName(jdbcDriver).newInstance(); }catch(Exception cnfe){ throw new IOException("could not register database driver. Class '" + jdbcDriver +"' not found"); } @@ -195,7 +191,6 @@ readRecord(); if ( rs.next() ) { vars = new HashMap(); - BufferedReader in; String key, value; for (int x = 1; x <= keys.size(); x++ ) { key = (String)keys.get(x-1); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/function/AttributeBroker.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/function/AttributeBroker.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/function/AttributeBroker.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -196,7 +196,6 @@ protected Object getAttributeValueFromInstance(Attribute attr){ Object value = null; - String name = attr.getName(); if (attr.isInstanceVariable()) { Field field = getConsumerField(attr); if (field != null) { @@ -249,8 +248,6 @@ if (f != null){ //Found a field, now let's set it to objValue after finding it's appropriate type Class type = f.getType(); - Object o = f.get(consumer); - String tmpVal = o+""; if (type.isPrimitive()) { //Looks like the instance is a primitive if (objValue != null) { @@ -330,7 +327,6 @@ if (f != null) { try{ Class type = f.getType(); - Object o = f.get(consumer); if ( objValue != null) { //Looks like the instance is an object. if (objValue instanceof String) { Modified: trunk/jameleon-core/src/java/net/sf/jameleon/function/FunctionTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/function/FunctionTag.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/function/FunctionTag.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -26,15 +26,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.commons.jelly.MissingAttributeException; -import org.apache.commons.jelly.XMLOutput; -import org.apache.log4j.Logger; - import junit.framework.Assert; import junit.framework.AssertionFailedError; -import junit.framework.TestCase; -import junit.framework.TestResult; - import net.sf.jameleon.JameleonTagSupport; import net.sf.jameleon.ParamTag; import net.sf.jameleon.PostconditionTag; @@ -49,12 +42,15 @@ import net.sf.jameleon.exception.JameleonScriptException; import net.sf.jameleon.result.FunctionResult; import net.sf.jameleon.result.FunctionResultRecordable; -import net.sf.jameleon.result.SessionResult; import net.sf.jameleon.util.AssertLevel; import net.sf.jameleon.util.Configurator; import net.sf.jameleon.util.JameleonUtility; import net.sf.jameleon.util.StateStorer; +import org.apache.commons.jelly.MissingAttributeException; +import org.apache.commons.jelly.XMLOutput; +import org.apache.log4j.Logger; + /** * <p> * Represents an abstract function point that does a lot behind the scenes for the function point developer. Modified: trunk/jameleon-core/src/java/net/sf/jameleon/launch/JameleonLauncher.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/launch/JameleonLauncher.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/launch/JameleonLauncher.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -25,7 +25,6 @@ import java.net.MalformedURLException; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; import java.util.StringTokenizer; Modified: trunk/jameleon-core/src/java/net/sf/jameleon/launch/JameleonMain.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/launch/JameleonMain.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/launch/JameleonMain.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -18,7 +18,6 @@ */ package net.sf.jameleon.launch; -import java.util.Properties; /** * Interface used to bridge to the actual Main class without any Modified: trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonHTMLLayout.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonHTMLLayout.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonHTMLLayout.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -18,20 +18,17 @@ */ package net.sf.jameleon.logging; -import java.util.Date; -import java.util.Iterator; import java.util.List; -import java.util.ResourceBundle; -import org.apache.log4j.helpers.Transform; -import org.apache.log4j.Layout; -import org.apache.log4j.spi.LoggingEvent; - -import net.sf.jameleon.result.*; +import net.sf.jameleon.result.TestCaseResult; import net.sf.jameleon.util.Configurator; import net.sf.jameleon.util.JameleonDefaultValues; import net.sf.jameleon.util.JameleonUtility; +import org.apache.log4j.Layout; +import org.apache.log4j.helpers.Transform; +import org.apache.log4j.spi.LoggingEvent; + public class JameleonHTMLLayout extends JameleonLayout { protected int testCaseNum = 1; @@ -90,8 +87,6 @@ String percentagePassed = getPercentagePassed(numRun, numFailed); - String outcome = result.getOutcome(); - String rowS = null; String cellS = null; String outcomeS = null; Modified: trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonLayout.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonLayout.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonLayout.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -19,16 +19,16 @@ package net.sf.jameleon.logging; import java.text.NumberFormat; -import java.util.ArrayList; import java.util.Date; import java.util.Iterator; import java.util.List; +import net.sf.jameleon.result.JameleonTestResult; +import net.sf.jameleon.result.TestCaseResult; +import net.sf.jameleon.util.JameleonUtility; + import org.apache.log4j.Layout; -import net.sf.jameleon.result.*; -import net.sf.jameleon.util.JameleonUtility; - public abstract class JameleonLayout extends Layout { protected static final int BUF_SIZE = 256; Modified: trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonSimpleLayout.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonSimpleLayout.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonSimpleLayout.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -18,17 +18,14 @@ */ package net.sf.jameleon.logging; -import net.sf.jameleon.result.*; -import net.sf.jameleon.util.JameleonUtility; +import java.util.List; -import org.apache.log4j.helpers.Transform; +import net.sf.jameleon.result.TestCaseResult; + import org.apache.log4j.Layout; +import org.apache.log4j.helpers.Transform; import org.apache.log4j.spi.LoggingEvent; -import java.util.Date; -import java.util.Iterator; -import java.util.List; - public class JameleonSimpleLayout extends JameleonLayout { /** @@ -52,8 +49,6 @@ totalTestsFailed += numFailed; totalTestsPassed += (numRun - numFailed); - String percentagePassed = getPercentagePassed(numRun, numFailed); - String outcome = result.getOutcome(); String testCaseName = result.getTestName(); @@ -80,8 +75,6 @@ */ public String getFooter() { String totalExecutionTime = getExecutionTime(); - String percentagePassed = getPercentagePassed(totalTestsRun, totalTestsFailed); - StringBuffer sb = new StringBuffer(); sb.append(Layout.LINE_SEP); sb.append("Tests run: ").append(totalTestsRun); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonXMLLayout.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonXMLLayout.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonXMLLayout.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -18,15 +18,12 @@ */ package net.sf.jameleon.logging; +import java.util.Calendar; + import net.sf.jameleon.XMLable; -import org.apache.log4j.Layout; import org.apache.log4j.spi.LoggingEvent; -import org.apache.log4j.spi.LocationInfo; -import org.apache.log4j.helpers.Transform; -import java.util.Calendar; - public class JameleonXMLLayout extends JameleonLayout { protected String getFormatedTimeStamp(long time) { Modified: trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/ExecuteJameleonScriptTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/ExecuteJameleonScriptTag.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/ExecuteJameleonScriptTag.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -23,23 +23,9 @@ import java.io.StringReader; import java.io.StringWriter; import java.util.ArrayList; -import java.util.Enumeration; import java.util.Iterator; import java.util.List; -import org.apache.log4j.Appender; -import org.apache.log4j.Layout; -import org.apache.log4j.Level; -import org.apache.log4j.LogManager; -import org.apache.log4j.Logger; -import org.apache.log4j.WriterAppender; -import org.apache.log4j.spi.LoggerRepository; -import org.apache.log4j.varia.DenyAllFilter; -import org.dom4j.Document; -import org.dom4j.DocumentException; -import org.dom4j.Node; -import org.dom4j.io.SAXReader; - import net.sf.jameleon.ExecuteTestCase; import net.sf.jameleon.TestCaseTag; import net.sf.jameleon.event.TestCaseEvent; @@ -53,6 +39,19 @@ import net.sf.jameleon.result.JameleonTestResult; import net.sf.jameleon.result.TestCaseResult; +import org.apache.log4j.Appender; +import org.apache.log4j.Layout; +import org.apache.log4j.Level; +import org.apache.log4j.LogManager; +import org.apache.log4j.Logger; +import org.apache.log4j.WriterAppender; +import org.apache.log4j.spi.LoggerRepository; +import org.apache.log4j.varia.DenyAllFilter; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Node; +import org.dom4j.io.SAXReader; + /** * Executes a Jameleon script and checks various outputs. Used for acceptance testing * Jameleon functionality. This tag can be used for plug-ins as well. Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/CountableResult.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/CountableResult.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/CountableResult.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -18,7 +18,6 @@ */ package net.sf.jameleon.result; -import java.util.List; /** * Describes a result that is countable Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -20,10 +20,6 @@ import net.sf.jameleon.bean.FunctionalPoint; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; - /** * An implementation of @see TestResult that represents the results of a data-drivable tag. * A DataDrivableResult can contain session results and function point results. Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/JameleonTestResult.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/JameleonTestResult.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/JameleonTestResult.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -19,13 +19,12 @@ package net.sf.jameleon.result; import java.io.File; -import java.util.Iterator; -import org.apache.commons.jelly.LocationAware; - import net.sf.jameleon.XMLable; import net.sf.jameleon.bean.FunctionalPoint; import net.sf.jameleon.util.JameleonUtility; + +import org.apache.commons.jelly.LocationAware; /** * An abstract Test Result. * Generic <code>toXML</code> and <codetoString</codetoString methods are provided Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/TestCaseResult.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/TestCaseResult.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/TestCaseResult.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -19,10 +19,8 @@ package net.sf.jameleon.result; import java.util.ArrayList; -import java.util.HashSet; import java.util.Iterator; import java.util.List; -import java.util.Set; import net.sf.jameleon.bean.FunctionalPoint; @@ -107,7 +105,6 @@ public List getCountableResults(){ List countabeResults = new ArrayList(); - HasChildResults cResult; Object obj; for (Iterator it = getChildrenResults().iterator(); it.hasNext();) { obj = it.next(); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/TestResultWithChildren.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/TestResultWithChildren.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/TestResultWithChildren.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -79,7 +79,6 @@ public List getAllChildrenResults(){ List allResults = new ArrayList(); JameleonTestResult jtr; - HasChildResults hcr; for (Iterator it = getChildrenResults().iterator(); it.hasNext();) { jtr = (JameleonTestResult)it.next(); allResults.add(jtr); @@ -92,7 +91,6 @@ public List getCountableResults(){ List countabeResults = new ArrayList(); - HasChildResults cResult; Object obj; if (this instanceof CountableResult) { countabeResults.add(this); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/sql/AbstractSqlTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/sql/AbstractSqlTag.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/sql/AbstractSqlTag.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -118,10 +118,11 @@ throw new SQLException( error + sqle.toString() +" " ); } catch ( ClassNotFoundException cnfe){ String error = "Couldn't load class "+jdbcDriver+"!!\n"; - throw new SQLException( error = cnfe.toString() ); + throw new SQLException( error + cnfe.toString()); } return conn; } + public String getSql(){ String sql = null; Modified: trunk/jameleon-core/src/java/net/sf/jameleon/taglet/AbstractJameleonTaglet.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/taglet/AbstractJameleonTaglet.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/taglet/AbstractJameleonTaglet.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -51,15 +51,14 @@ protected static void doRegister(Map tagletMap, Taglet tag){ Taglet t = (Taglet) tagletMap.get(tag.getName()); - if (tag != null) { - tagletMap.remove(tag.getName()); + if (t != null) { + tagletMap.remove(t.getName()); } - tagletMap.put(tag.getName(),tag); + tagletMap.put(tag.getName(), tag); } protected String getValueFromAttribute(String tagText, String attrName){ String tagName = null; - String str = null; final String TAG_NAME_ATTR = attrName+"=\""; int index = tagText.indexOf(TAG_NAME_ATTR); int start = index+TAG_NAME_ATTR.length(); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ui/AboutDialog.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/AboutDialog.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/AboutDialog.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -17,7 +17,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package net.sf.jameleon.ui; -import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ResourceBundle; @@ -28,7 +27,6 @@ import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; -import javax.swing.SpringLayout; public class AboutDialog extends JDialog{ Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ui/AbstractConfigPanel.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/AbstractConfigPanel.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/AbstractConfigPanel.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -22,7 +22,6 @@ import java.util.Iterator; import java.util.LinkedList; import java.util.List; -import java.util.Properties; import javax.swing.JCheckBox; import javax.swing.JComponent; @@ -45,8 +44,6 @@ } private void init(){ - Configurator config = Configurator.getInstance(); - registerFields(); SpringUtilities.makeCompactGrid(this, fieldProperties.size(), 2, //rows, cols Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ui/BasicHtmlBrowser.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/BasicHtmlBrowser.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/BasicHtmlBrowser.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -18,7 +18,6 @@ */ package net.sf.jameleon.ui; -import java.awt.Component; import java.net.URL; import javax.swing.JFrame; @@ -27,7 +26,6 @@ import org.jdesktop.jdic.browser.BrowserEngineManager; import org.jdesktop.jdic.browser.IBrowserEngine; import org.jdesktop.jdic.browser.IWebBrowser; -import org.jdesktop.jdic.browser.WebBrowser; import org.jdesktop.jdic.browser.WebBrowserEvent; import org.jdesktop.jdic.browser.WebBrowserListener; @@ -42,7 +40,6 @@ } protected void init(){ - final boolean AUTO_DISPOSE = true; BrowserEngineManager bem = BrowserEngineManager.instance(); IBrowserEngine be = bem.getActiveEngine(); if (be != null){ Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ui/ConfigDialog.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/ConfigDialog.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/ConfigDialog.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -31,9 +31,7 @@ import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JPanel; -import javax.swing.JScrollPane; import javax.swing.JTabbedPane; -import javax.swing.SpringLayout; import net.sf.jameleon.util.Configurator; Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ui/DataDrivableDebugDialog.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/DataDrivableDebugDialog.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/DataDrivableDebugDialog.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -18,11 +18,8 @@ */ package net.sf.jameleon.ui; -import java.util.Iterator; -import java.util.List; import java.util.Map; -import javax.swing.table.DefaultTableModel; import javax.swing.JFrame; import net.sf.jameleon.data.AbstractDataDrivableTag; Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ui/DebugDialog.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/DebugDialog.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/DebugDialog.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -18,33 +18,22 @@ */ package net.sf.jameleon.ui; -import java.awt.BorderLayout; -import java.awt.Dimension; import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.util.Calendar; import java.util.Iterator; -import java.util.List; import java.util.Map; import javax.swing.JButton; -import javax.swing.JComponent; -import javax.swing.JDialog; +import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; -import javax.swing.JRootPane; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.SpringLayout; -import javax.swing.event.TableModelEvent; -import javax.swing.event.TableModelListener; import javax.swing.table.DefaultTableModel; -import net.sf.jameleon.bean.Attribute; -import net.sf.jameleon.function.FunctionTag; - public abstract class DebugDialog extends JDialog{ private TestCaseResultsFrame resultsFrame; @@ -95,7 +84,6 @@ final DefaultTableModel attributesM = new DefaultTableModel(new Object[]{"Variable", "Value"}, 0); Map attributes = getAttributes(); Iterator it = attributes.keySet().iterator(); - String name; while (it.hasNext()) { Object[] values = new Object[2]; values[0] = it.next(); @@ -141,7 +129,6 @@ } private void registerNewAttributes(DefaultTableModel attributesM, boolean stepNextTag){ - Attribute attr; resultsFrame.setStepNextTag(stepNextTag); while (attributesM.getRowCount() > 0) { String name = (String) attributesM.getValueAt(0,0); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ui/FunctionalPointTree.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/FunctionalPointTree.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/FunctionalPointTree.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -18,28 +18,26 @@ */ package net.sf.jameleon.ui; -import java.awt.*; -import java.io.File; import java.io.IOException; -import java.io.InputStream; import java.io.InvalidClassException; import java.util.Collections; import java.util.Enumeration; import java.util.HashSet; import java.util.Iterator; -import java.util.LinkedList; import java.util.Map; -import java.util.Properties; import java.util.Set; import java.util.TreeSet; -import javax.swing.*; -import javax.swing.event.*; -import javax.swing.table.*; -import javax.swing.tree.*; +import javax.swing.JTree; +import javax.swing.event.TreeExpansionEvent; +import javax.swing.event.TreeSelectionEvent; +import javax.swing.event.TreeSelectionListener; +import javax.swing.event.TreeWillExpandListener; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.DefaultTreeModel; +import javax.swing.tree.TreePath; import net.sf.jameleon.TestCaseTagLibrary; -import net.sf.jameleon.bean.Attribute; import net.sf.jameleon.bean.FunctionalPoint; import net.sf.jameleon.util.InstanceSerializer; import net.sf.jameleon.util.SupportedTags; Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ui/JameleonUI.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/JameleonUI.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/JameleonUI.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -18,32 +18,38 @@ */ package net.sf.jameleon.ui; -import java.awt.*; +import java.awt.CardLayout; +import java.awt.Color; +import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.util.Enumeration; import java.util.Iterator; import java.util.LinkedList; import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Vector; -import javax.swing.*; -import javax.swing.event.*; -import javax.swing.table.*; +import javax.swing.JEditorPane; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JSplitPane; +import javax.swing.JTabbedPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.SpringLayout; +import javax.swing.SwingUtilities; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import javax.swing.table.DefaultTableModel; import javax.swing.text.html.HTMLEditorKit; -import javax.swing.tree.*; import net.sf.jameleon.bean.Attribute; import net.sf.jameleon.bean.FunctionalPoint; import net.sf.jameleon.launch.JameleonMain; -import net.sf.jameleon.util.InstanceSerializer; -import net.sf.jameleon.util.SupportedTags; public class JameleonUI extends JFrame implements FPDisplayer, JameleonMain{ @@ -145,7 +151,7 @@ JMenuItem options = new JMenuItem("Options...", KeyEvent.VK_O); options.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { - ConfigDialog cf = new ConfigDialog(owner); + new ConfigDialog(owner); tct.generateScriptsTree(); } }); @@ -155,7 +161,7 @@ JMenuItem about = new JMenuItem("About", KeyEvent.VK_A); about.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { - AboutDialog about = new AboutDialog(owner); + new AboutDialog(owner); } }); help.add(about); @@ -174,7 +180,6 @@ final JLabel attributesL = new JLabel("Atributes:"); JPanel fpPanel = new JPanel(); - JPanel treePanel = new JPanel(); SpringLayout fpSpringLayout = new SpringLayout(); JScrollPane descScrollPane = new JScrollPane(descriptionF); JScrollPane stepsScrollPane = new JScrollPane(stepsF); @@ -251,8 +256,6 @@ } LinkedList steps = fp.getSteps(); it = steps.iterator(); - Object obj = null; - int rows = 1; StringBuffer stepsS = new StringBuffer("<font size='-1'>"); String step; int indexSteps = 0; Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ui/ProgressDialog.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/ProgressDialog.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/ProgressDialog.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -18,18 +18,15 @@ */ package net.sf.jameleon.ui; -import java.awt.Color; import java.awt.Point; import java.io.File; -import java.net.URLClassLoader; -import javax.swing.JDialog; +import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JProgressBar; import javax.swing.SpringLayout; -import javax.swing.SwingUtilities; public class ProgressDialog extends JDialog { Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ui/SortableJTable.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/SortableJTable.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/SortableJTable.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -19,7 +19,6 @@ package net.sf.jameleon.ui; import javax.swing.JTable; -import javax.swing.table.TableModel; public class SortableJTable extends JTable{ Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCaseDocsExecutor.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCaseDocsExecutor.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCaseDocsExecutor.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -1,20 +1,10 @@ package net.sf.jameleon.ui; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import java.io.File; -import java.io.IOException; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JLabel; import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.JTextArea; import net.sf.jameleon.bean.TestCase; -import net.sf.jameleon.util.JameleonUtility; public class TestCaseDocsExecutor extends Thread { private File script; Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCasePane.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCasePane.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCasePane.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -19,48 +19,40 @@ package net.sf.jameleon.ui; import java.awt.BorderLayout; -import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; -import java.io.File; import java.io.IOException; -import java.io.StringWriter; import java.lang.reflect.Method; import java.net.URL; -import java.net.URLClassLoader; import java.util.HashMap; -import java.util.Iterator; -import javax.swing.*; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JEditorPane; +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTabbedPane; +import javax.swing.JTextArea; +import javax.swing.SpringLayout; import javax.swing.event.HyperlinkEvent; -import javax.swing.event.HyperlinkEvent.EventType; import javax.swing.event.HyperlinkListener; -import javax.swing.text.Caret; -import javax.swing.text.DefaultCaret; import javax.swing.text.html.HTMLEditorKit; import javax.swing.tree.TreePath; -import org.apache.commons.jelly.JellyContext; -import org.apache.commons.jelly.JellyException; -import org.apache.velocity.Template; -import org.apache.velocity.VelocityContext; -import org.apache.velocity.app.Velocity; -import org.apache.velocity.exception.MethodInvocationException; -import org.apache.velocity.exception.ParseErrorException; -import org.apache.velocity.exception.ResourceNotFoundException; - import net.sf.jameleon.ExecuteTestCase; import net.sf.jameleon.bean.TestCase; import net.sf.jameleon.event.DataDrivableEventHandler; import net.sf.jameleon.event.FunctionEventHandler; import net.sf.jameleon.event.TestCaseEventHandler; import net.sf.jameleon.util.Configurator; -import net.sf.jameleon.util.JameleonUtility; import net.sf.jameleon.util.TestCaseDocsTransformer; +import org.apache.commons.jelly.JellyException; + public class TestCasePane extends JPanel { protected JEditorPane tcDocsPane = new JEditorPane(); @@ -260,7 +252,7 @@ this.interrupt(); } try{ - Thread.currentThread().sleep(100); + Thread.sleep(100); }catch(InterruptedException ie){ //Apparently people don't like a stack trace printing out to the screen. //ie.printStackTrace(); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCaseResultsFrame.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCaseResultsFrame.java 2006-11-12 19:34:13 UTC (rev 1198) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCaseResultsFrame.java 2006-11-13 17:43:14 UTC (rev 1199) @@ -18,19 +18,12 @@ */ package net.sf.jameleon.ui; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.Label; import java.awt.Point; -imp... [truncated message content] |
From: <en...@us...> - 2006-12-01 15:13:58
|
Revision: 1231 http://svn.sourceforge.net/jameleon/?rev=1231&view=rev Author: engrean Date: 2006-12-01 07:13:54 -0800 (Fri, 01 Dec 2006) Log Message: ----------- Feature Request #1604944 - Added a new registerEventListener method to help with the new JameleonJUnitTestCase class Modified Paths: -------------- trunk/jameleon-core/src/java/net/sf/jameleon/ExecuteTestCase.java trunk/jameleon-core/tst/java/net/sf/jameleon/ExecuteTestCaseTest.java Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ExecuteTestCase.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ExecuteTestCase.java 2006-11-27 13:35:50 UTC (rev 1230) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ExecuteTestCase.java 2006-12-01 15:13:54 UTC (rev 1231) @@ -98,15 +98,13 @@ public void registerEventListeners(){ String[] tcListeners = Configurator.getInstance().getValueAsArray(TEST_CASE_LISTENERS); TestCaseListener tcListener; - TestCaseEventHandler tcHandler = TestCaseEventHandler.getInstance(); Class c; for (int i = 0; tcListeners != null && i < tcListeners.length; i++) { try{ c = Thread.currentThread().getContextClassLoader().loadClass(tcListeners[i]); tcListener = (TestCaseListener)c.newInstance(); //Store it for later removal - testCaseListeners.add(tcListener); - tcHandler.addTestCaseListener(tcListener); + registerEventListener(tcListener); }catch(Exception e){ e.printStackTrace(); System.err.println("Could not register TestCaseListeners: "+e.getMessage()); @@ -115,6 +113,18 @@ } /** + * Register a new TestCaseEventListener + * in the TestCaseEventHandler. + */ + public void registerEventListener(TestCaseListener tcListener){ + if (tcListener != null) { + TestCaseEventHandler tcHandler = TestCaseEventHandler.getInstance(); + testCaseListeners.add(tcListener); + tcHandler.addTestCaseListener(tcListener); + } + } + + /** * Remove all TestCaseListeners registered via the registerEventListeners method. */ public void deregisterEventListeners(){ Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/ExecuteTestCaseTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/ExecuteTestCaseTest.java 2006-11-27 13:35:50 UTC (rev 1230) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/ExecuteTestCaseTest.java 2006-12-01 15:13:54 UTC (rev 1231) @@ -70,6 +70,22 @@ assertFalse( listeners.get(0) == listeners.get(1)); } + public void testRegisterEventListener(){ + exec.registerEventListener(null); + + List listeners = TestCaseEventHandler.getInstance().getTestCaseListeners(); + assertEquals("# of listeners before", 0, listeners.size()); + + exec.registerEventListener(new TestTestCaseListener()); + listeners = TestCaseEventHandler.getInstance().getTestCaseListeners(); + assertEquals("# of listeners after", 1, listeners.size()); + assertTrue("1st listener is not an instance of DummyTestCaseListener1", listeners.get(0) instanceof TestTestCaseListener); + exec.registerEventListener(new TestTestCaseListener()); + assertEquals("# of listeners after", 2, listeners.size()); + assertTrue("2nd listener is not an instance of DummyTestCaseListener2", listeners.get(1) instanceof TestTestCaseListener); + assertFalse( listeners.get(0) == listeners.get(1)); + } + public void testDeregisterEventListeners(){ Configurator.getInstance().setValue(ExecuteTestCase.TEST_CASE_LISTENERS, TestTestCaseListener.class.getName() + " "+TestTestCaseListener.class.getName()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2006-12-09 00:12:34
|
Revision: 1232 http://svn.sourceforge.net/jameleon/?rev=1232&view=rev Author: engrean Date: 2006-12-08 16:12:32 -0800 (Fri, 08 Dec 2006) Log Message: ----------- Added Feature Request #1611902 - Add countRow back into data-drivable results objects Modified Paths: -------------- trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/ExecuteJameleonScriptTag.java trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java trunk/jameleon-core/tst/java/TestAll.java trunk/jameleon-core/tst/java/net/sf/jameleon/CsvTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/AbstractDataDrivableTagTest.java trunk/jameleon-core/tst/xml/acceptance/fineGrainedTests.xml Added Paths: ----------- trunk/jameleon-core/src/java/net/sf/jameleon/result/CountableDataDrivableResult.java trunk/jameleon-core/tst/java/net/sf/jameleon/MockCsvTag2.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/CountableDataDrivableResultTest.java Modified: trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java 2006-12-01 15:13:54 UTC (rev 1231) +++ trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java 2006-12-09 00:12:32 UTC (rev 1232) @@ -37,6 +37,7 @@ import net.sf.jameleon.data.DataDrivable; import net.sf.jameleon.event.TestCaseEventHandler; import net.sf.jameleon.exception.JameleonScriptException; +import net.sf.jameleon.result.CountableDataDrivableResult; import net.sf.jameleon.result.DataDrivableResult; import net.sf.jameleon.result.JameleonTestResult; import net.sf.jameleon.result.TestCaseResult; @@ -669,9 +670,9 @@ } catch (ThreadDeath td){ throw td; } catch (Throwable t) { - if (trace){ - log.info(JameleonUtility.getStack(t)); - } + if (trace){ + log.info(JameleonUtility.getStack(t)); + } LocationAware la = null; Throwable err = t; if (t.getCause() != null && t.getCause() instanceof LocationAware) { @@ -716,7 +717,7 @@ */ public void executeDrivableRow(int rowNum){ traceMsg("BEGIN executing row number "+rowNum); - ddResult = new DataDrivableResult(fp, results); + ddResult = new CountableDataDrivableResult(fp, results); ddResult.copyLocationAwareProperties(this); stateStorer.setStoreDir(getResultsDir(rowNum)); invokeChildren(rowNum, ddResult); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java 2006-12-01 15:13:54 UTC (rev 1231) +++ trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java 2006-12-09 00:12:32 UTC (rev 1232) @@ -32,6 +32,7 @@ import net.sf.jameleon.event.BreakPoint; import net.sf.jameleon.exception.JameleonScriptException; import net.sf.jameleon.result.DataDrivableResult; +import net.sf.jameleon.result.CountableDataDrivableResult; import net.sf.jameleon.result.DataDrivableResultRecordable; import net.sf.jameleon.result.FunctionResult; import net.sf.jameleon.result.FunctionResultRecordable; @@ -256,26 +257,20 @@ traceMsg("BEGIN executing row number "+rowNum); try{ //The first result has already been added. - if (isCountRow() && rowNum > 1) { - dataDrivableResult = new DataDrivableResult(fp); - recordThisResult(); - } - if (isCountRow()) { -/* -Create a new TestCaseResult - if (rowNum > 1) { - testCaseResults.incrementRowsExecuted(); - testCaseResults.setRowNum(rowNum); - } -*/ - } + if (rowNum > 1){ + if (isCountRow()) { + dataDrivableResult = new CountableDataDrivableResult(fp); + }else{ + dataDrivableResult = new DataDrivableResult(fp); + } + recordThisResult(); + } stateStorer.setStoreDir(new File(stateStorer.getStoreDir(), getNewStateStoreLocation(rowNum))); try { invokeBody(xmlOut); } catch (ThreadDeath td){ throw td; } catch (Throwable t) { -// res.setFunctionId(getTagDescription()); LocationAware la = null; Throwable err = t; if (t.getCause() != null && t.getCause() instanceof LocationAware) { @@ -357,7 +352,7 @@ if (addt == null) { addt = this; } - dataDrivableResult = new DataDrivableResult(fp); + dataDrivableResult = createNewResult(); Object obj = findAncestorWithClass(DataDrivableResultRecordable.class); if (obj != null) { resultRecorder = (DataDrivableResultRecordable)obj; @@ -388,19 +383,34 @@ traceMsg("END: "+getTagTraceMsg()); }catch(FileNotFoundException fnfe){ tct.setFailedOnDataDriver(true); - dataDrivableResult.setError(fnfe); + setResultError(fnfe); }catch(IOException ioe){ - dataDrivableResult.setError(new JameleonScriptException(getDataExceptionMessage(), ioe)); + setResultError(new JameleonScriptException(getDataExceptionMessage(), ioe)); }catch(ThreadDeath td){ throw td; }catch(Throwable t){ - dataDrivableResult.setError(new JameleonScriptException(t)); + setResultError(new JameleonScriptException(t)); } } + protected void setResultError(Exception e){ + dataDrivableResult.setError(e); + } + + protected DataDrivableResult createNewResult(){ + DataDrivableResult ddr = null; + if (isCountRow()){ + ddr = new CountableDataDrivableResult(fp); + }else{ + ddr = new DataDrivableResult(fp); + } + return ddr; + } + public Map getRowData(){ return rowData; } + ///////////////////////////////////////////////////////// // ResultRecordable Methods // ///////////////////////////////////////////////////////// Modified: trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/ExecuteJameleonScriptTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/ExecuteJameleonScriptTag.java 2006-12-01 15:13:54 UTC (rev 1231) +++ trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/ExecuteJameleonScriptTag.java 2006-12-09 00:12:32 UTC (rev 1232) @@ -33,6 +33,7 @@ import net.sf.jameleon.event.TestCaseListener; import net.sf.jameleon.logging.JameleonHTMLLayout; import net.sf.jameleon.logging.JameleonXMLLayout; +import net.sf.jameleon.result.CountableDataDrivableResult; import net.sf.jameleon.result.DataDrivableResult; import net.sf.jameleon.result.DataDrivableResultRecordable; import net.sf.jameleon.result.FunctionResult; @@ -288,7 +289,7 @@ base.setLevel(Level.INFO); TestCaseEventHandler.getInstance().addTestCaseListener(listener); - dataDrivableResult = new DataDrivableResult(fp); + dataDrivableResult = new CountableDataDrivableResult(fp); dataDrivableResult.copyLocationAwareProperties(this); DataDrivableResultRecordable resultRecorder = (DataDrivableResultRecordable)findAncestorWithClass(DataDrivableResultRecordable.class); Added: trunk/jameleon-core/src/java/net/sf/jameleon/result/CountableDataDrivableResult.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/CountableDataDrivableResult.java (rev 0) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/CountableDataDrivableResult.java 2006-12-09 00:12:32 UTC (rev 1232) @@ -0,0 +1,50 @@ +/* + Jameleon - An automation testing tool.. + Copyright (C) 2003-2006 Christian W. Hargraves (en...@ho...) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +package net.sf.jameleon.result; + +import net.sf.jameleon.bean.FunctionalPoint; + +public class CountableDataDrivableResult + extends DataDrivableResult + implements CountableResult { + + protected boolean countableResultFailed; + + public CountableDataDrivableResult(FunctionalPoint tag) { + super(tag); + // TODO Auto-generated constructor stub + } + + public CountableDataDrivableResult(FunctionalPoint tag, HasChildResults parentResults){ + super(tag, parentResults); + } + + ///////////////////////////////////////////////////////////////////////////////// + // CountableResult methods // + ///////////////////////////////////////////////////////////////////////////////// + + public void countFailure(){ + countableResultFailed = true; + } + + public boolean isCountableResultFailed(){ + return countableResultFailed; + } + +} Property changes on: trunk/jameleon-core/src/java/net/sf/jameleon/result/CountableDataDrivableResult.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java 2006-12-01 15:13:54 UTC (rev 1231) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java 2006-12-09 00:12:32 UTC (rev 1232) @@ -24,12 +24,8 @@ * An implementation of @see TestResult that represents the results of a data-drivable tag. * A DataDrivableResult can contain session results and function point results. */ -public class DataDrivableResult - extends TestResultWithChildren - implements CountableResult { +public class DataDrivableResult extends TestResultWithChildren { - protected boolean countableResultFailed; - public DataDrivableResult(FunctionalPoint tag){ super(tag); } @@ -54,16 +50,4 @@ public String toString() { return super.toString(); } - - ///////////////////////////////////////////////////////////////////////////////// - // CountableResult methods // - ///////////////////////////////////////////////////////////////////////////////// - - public void countFailure(){ - countableResultFailed = true; - } - - public boolean isCountableResultFailed(){ - return countableResultFailed; - } } \ No newline at end of file Modified: trunk/jameleon-core/tst/java/TestAll.java =================================================================== --- trunk/jameleon-core/tst/java/TestAll.java 2006-12-01 15:13:54 UTC (rev 1231) +++ trunk/jameleon-core/tst/java/TestAll.java 2006-12-09 00:12:32 UTC (rev 1232) @@ -35,6 +35,7 @@ public static Test suite() { TestSuite suite= new TestSuite("All JUnit Tests"); + suite.addTest(net.sf.jameleon.result.CountableDataDrivableResultTest.suite()); suite.addTest(net.sf.jameleon.TestScriptTagTest.suite()); suite.addTest(net.sf.jameleon.TestSuiteTagTest.suite()); suite.addTest(net.sf.jameleon.ExecuteTestCaseTest.suite()); Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/CsvTagTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/CsvTagTest.java 2006-12-01 15:13:54 UTC (rev 1231) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/CsvTagTest.java 2006-12-09 00:12:32 UTC (rev 1232) @@ -21,20 +21,19 @@ import java.io.File; import java.util.HashMap; -import org.apache.commons.jelly.JellyContext; -import org.apache.commons.jelly.JellyTagException; -import org.apache.commons.jelly.XMLOutput; - import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; - import net.sf.jameleon.function.MockFunctionTag; import net.sf.jameleon.result.JameleonTestResult; import net.sf.jameleon.result.TestCaseResult; import net.sf.jameleon.util.Configurator; import net.sf.jameleon.util.JameleonUtility; +import org.apache.commons.jelly.JellyContext; +import org.apache.commons.jelly.JellyTagException; +import org.apache.commons.jelly.XMLOutput; + public class CsvTagTest extends TestCase { private CsvTag csvTag; @@ -146,10 +145,16 @@ testCaseTag.setTestEnvironment("test"); testCaseTag.setGenTestCaseDocs(false); testCaseTag.results = new TestCaseResult(testCaseTag.getFunctionalPoint()); + csvTag = new MockCsvTag2(); + csvTag.setContext(context); + csvTag.setParent(testCaseTag); + csvTag.setUpDataDrivable(); + csvTag.init(); + csvTag.setName("_MyCsvFile_"); csvTag.doTag(XMLOutput.createDummyXMLOutput()); + assertTrue("test case should be marked as failed", testCaseTag.getResults().failed()); String errMsg = ((JameleonTestResult)testCaseTag.getResults().getFailedResults().get(0)).getError().getMessage(); - assertTrue("test case should be marked as failed", testCaseTag.getResults().failed()); assertTrue("Message should be something about file not found, but was " + errMsg, errMsg.indexOf(JameleonUtility.fixFileSeparators("./data/test/_MyCsvFile_.csv")) >= 0); } @@ -157,6 +162,11 @@ testCaseTag.setFailOnCSVFileNotFound(false); testCaseTag.setGenTestCaseDocs(false); testCaseTag.setUp(); + csvTag = new MockCsvTag2(); + csvTag.setContext(context); + csvTag.setParent(testCaseTag); + csvTag.setUpDataDrivable(); + csvTag.init(); csvTag.setName("_MyCsvFile_"); csvTag.doTag(XMLOutput.createDummyXMLOutput()); assertTrue("TestCaseTag should have been updated that the CSV file was not found",testCaseTag.failedOnDataDriver); Added: trunk/jameleon-core/tst/java/net/sf/jameleon/MockCsvTag2.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/MockCsvTag2.java (rev 0) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/MockCsvTag2.java 2006-12-09 00:12:32 UTC (rev 1232) @@ -0,0 +1,38 @@ +/* + Jameleon - An automation testing tool.. + Copyright (C) 2006 Christian W. Hargraves (en...@ho...) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +package net.sf.jameleon; + +import net.sf.jameleon.bean.FunctionalPoint; +import net.sf.jameleon.result.DataDrivableResult; + +/** + * Simply overrides the <code>CsvTag</code>'s destroyVariables() method. + * @jameleon.function name="mock-csv2" + */ +public class MockCsvTag2 extends CsvTag { + + protected void setResultError(Exception e){ + if (dataDrivableResult == null){ + dataDrivableResult = new DataDrivableResult(new FunctionalPoint()); + recordThisResult(); + } + dataDrivableResult.setError(e); + } + +} Property changes on: trunk/jameleon-core/tst/java/net/sf/jameleon/MockCsvTag2.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/data/AbstractDataDrivableTagTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/data/AbstractDataDrivableTagTest.java 2006-12-01 15:13:54 UTC (rev 1231) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/data/AbstractDataDrivableTagTest.java 2006-12-09 00:12:32 UTC (rev 1232) @@ -26,6 +26,7 @@ import junit.framework.TestSuite; import net.sf.jameleon.MockSessionTag; import net.sf.jameleon.TestCaseTag; +import net.sf.jameleon.result.CountableDataDrivableResult; import net.sf.jameleon.result.DataDrivableResult; import org.apache.commons.jelly.JellyContext; @@ -69,6 +70,13 @@ mockST.setParent(testCaseTag); mockDdTag.setParent(mockST); } + + public void testCreateNewResult(){ + assertFalse("result should not be countable", mockDdTag.createNewResult() instanceof CountableDataDrivableResult); + mockDdTag.countRow = true; + assertTrue("result should not be countable", mockDdTag.createNewResult() instanceof CountableDataDrivableResult); + + } public void testSetUpDataDrivable(){ assertNull("test case tag", mockDdTag.tct); @@ -111,7 +119,7 @@ Mock mockScript = new Mock(Script.class); mockScript.expect("run", new AnyConstraintMatcher()); mockDdTag.setBody((Script)mockScript.proxy()); - mockDdTag.executeDrivableRow(1); + mockDdTag.executeDrivableRow(2); mockScript.verify(); } @@ -124,16 +132,17 @@ mockDdTag.dataDrivableResult = new DataDrivableResult(null); mockDdTag.executeDrivableRow(1); assertNotNull("dataDrivableResult should not be null", mockDdTag.dataDrivableResult); + assertFalse("dataDrivableResult should not be countable", mockDdTag.dataDrivableResult instanceof CountableDataDrivableResult); DataDrivableResult prevResult = mockDdTag.dataDrivableResult; mockDdTag.executeDrivableRow(2); //Since countRow defaults to false, the dataDrivableResult should not have changed since the last execution - assertTrue("a new result should not have been created", prevResult == mockDdTag.dataDrivableResult); + assertFalse("dataDrivableResult should still not be countable", mockDdTag.dataDrivableResult instanceof CountableDataDrivableResult); + assertTrue("a new result should have been created", prevResult != mockDdTag.dataDrivableResult); prevResult = mockDdTag.dataDrivableResult; mockDdTag.setCountRow(true); mockDdTag.executeDrivableRow(3); assertNotNull("dataDrivableResult should not be null", mockDdTag.dataDrivableResult); - //Since countRow is true, a new dataDrivableResult should have been created - assertFalse("a new result should have been created", prevResult == mockDdTag.dataDrivableResult); + assertTrue("dataDrivableResult should be countable", mockDdTag.dataDrivableResult instanceof CountableDataDrivableResult); } } Added: trunk/jameleon-core/tst/java/net/sf/jameleon/result/CountableDataDrivableResultTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/result/CountableDataDrivableResultTest.java (rev 0) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/result/CountableDataDrivableResultTest.java 2006-12-09 00:12:32 UTC (rev 1232) @@ -0,0 +1,56 @@ +/* + Jameleon - An automation testing tool.. + Copyright (C) 2006 Christian W. Hargraves (en...@ho...) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +package net.sf.jameleon.result; + +import net.sf.jameleon.bean.FunctionalPoint; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +public class CountableDataDrivableResultTest extends TestCase { + private CountableDataDrivableResult cddr; + + public CountableDataDrivableResultTest(String name) { + super(name); + } + + public static void main(String args[]) { + junit.textui.TestRunner.run( suite() ); + } + + public static Test suite() { + return new TestSuite( CountableDataDrivableResultTest.class ); + } + + public void setUp(){ + cddr = new CountableDataDrivableResult(new FunctionalPoint()); + } + + public void testCountFailure(){ + cddr.countFailure(); + assertTrue(cddr.countableResultFailed); + } + + public void testIsCountableResultFailed(){ + assertFalse(cddr.isCountableResultFailed()); + cddr.countFailure(); + assertTrue(cddr.isCountableResultFailed()); + } +} Property changes on: trunk/jameleon-core/tst/java/net/sf/jameleon/result/CountableDataDrivableResultTest.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Modified: trunk/jameleon-core/tst/xml/acceptance/fineGrainedTests.xml =================================================================== --- trunk/jameleon-core/tst/xml/acceptance/fineGrainedTests.xml 2006-12-01 15:13:54 UTC (rev 1231) +++ trunk/jameleon-core/tst/xml/acceptance/fineGrainedTests.xml 2006-12-09 00:12:32 UTC (rev 1232) @@ -135,14 +135,6 @@ htmlLineNumFailed="31" /> -<!-- - <execute-jameleon-script - functionId="assert-not-null passing." - script="tst/xml/framework/assertNotNullPass.xml" - checkOutcomePassed="true" - /> - --> - <execute-jameleon-script functionId="assert-true failing." script="tst/xml/framework/assertTrueFail.xml" @@ -153,14 +145,6 @@ htmlLineNumFailed="32" /> -<!-- - <execute-jameleon-script - functionId="assert-true passing." - script="tst/xml/framework/assertTruePass.xml" - checkOutcomePassed="true" - /> - --> - <execute-jameleon-script functionId="assert-equals failing" script="tst/xml/framework/assertEqualsFail.xml" @@ -171,14 +155,6 @@ htmlLineNumFailed="33" /> -<!-- - <execute-jameleon-script - functionId="assert-equals passing." - script="tst/xml/framework/assertEqualsPass.xml" - checkOutcomePassed="true" - /> - --> - <execute-jameleon-script functionId="an appropriate error message is given when a test case fails at a functional point with precondition set to true" script="tst/xml/framework/precondition.xml" @@ -317,13 +293,6 @@ checkOutcomeFailed="true" numOfFunctionsRun="1"/> -<!-- - <execute-jameleon-script - functionId="the function point passes when an exception is thrown and expectException is set to true." - script="tst/xml/framework/exceptionExpected.xml" - checkOutcomePassed="true"/> - --> - <execute-jameleon-script functionId="the function point fails when an exception is thrown and expectException is 'false'." script="tst/xml/framework/exceptionNotExpected.xml" @@ -373,34 +342,6 @@ script="tst/xml/framework/csv_not_cleaning_up_old_variables_previous_row.xml" checkOutcomeFailed="true"/> -<!-- - <execute-jameleon-script - functionId="the assertGreaterThanLevel = SMOKE" - script="tst/xml/framework/assertGreaterThanSmoke.xml" - checkOutcomePassed="true" - /> - - <execute-jameleon-script - functionId="the assertGreaterThanLevel = FUNCTION" - script="tst/xml/framework/assertGreaterThanFunction.xml" - checkOutcomePassed="true"/> - - <execute-jameleon-script - functionId="the assertGreaterThanLevel = REGRESSION" - script="tst/xml/framework/assertGreaterThanRegression.xml" - checkOutcomePassed="true"/> - - <execute-jameleon-script - functionId="the assertGreaterThanLevel = ACCEPTANCE" - script="tst/xml/framework/assertGreaterThanAcceptance.xml" - checkOutcomePassed="true"/> - - <execute-jameleon-script - functionId="when a map-variable tag is embeded in a csv tag and type is set to list, that a list is created with the same number of values in it as in the CSV file." - script="tst/xml/framework/map_variable_from_variable_to_variable_csv.xml" - checkOutcomePassed="true"/> - --> - <execute-jameleon-script functionId="Nothing happens when the maxExecutionTime is not exceeded" script="tst/xml/framework/max_execution_time_not_exceeded.xml" @@ -428,20 +369,6 @@ checkOutcomePassed="true" numOfFunctionsRun="4"/> -<!-- - <execute-jameleon-script - functionId="an error won't occur just because the application doesn't exist in env-Applications.properties." - script="tst/xml/framework/no_app_in_application_properties.xml" - checkOutcomePassed="true"/> - --> - -<!-- - <execute-jameleon-script - functionId="a test case can still execute without setting a testEnvironment." - script="tst/xml/framework/no_test_environment.xml" - checkOutcomePassed="true"/> - --> - <execute-jameleon-script functionId="variable values in Applications.properties may be substituted in CSV files. " script="tst/xml/framework/csv_value_substitute.xml" @@ -524,7 +451,7 @@ script="tst/xml/framework/csv_file_name.xml" checkOutcomePassed="true" numOfFunctionsRun="2" - numOfTestCasesRun="2"/> + numOfTestCasesRun="1"/> <execute-jameleon-script functionId="sql tag without countRow setting" @@ -539,6 +466,5 @@ checkOutcomePassed="true" numOfFunctionsRun="8" numOfTestCasesRun="2"/> - </junit-session> </testcase> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2006-12-11 16:01:36
|
Revision: 1234 http://svn.sourceforge.net/jameleon/?rev=1234&view=rev Author: engrean Date: 2006-12-11 08:01:31 -0800 (Mon, 11 Dec 2006) Log Message: ----------- Added Feature Request #1613235 - Add data-drivable row data into results Modified Paths: -------------- trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java trunk/jameleon-core/tst/java/net/sf/jameleon/TestCaseTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/AbstractDataDrivableTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/DataDrivableResultTest.java Added Paths: ----------- trunk/jameleon-core/tst/java/net/sf/jameleon/MockTestCase2Tag.java Modified: trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java 2006-12-11 14:13:24 UTC (rev 1233) +++ trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java 2006-12-11 16:01:31 UTC (rev 1234) @@ -719,6 +719,7 @@ traceMsg("BEGIN executing row number "+rowNum); ddResult = new CountableDataDrivableResult(fp, results); ddResult.copyLocationAwareProperties(this); + ddResult.setRowData(rowData); stateStorer.setStoreDir(getResultsDir(rowNum)); invokeChildren(rowNum, ddResult); traceMsg("END executing row number "+rowNum); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java 2006-12-11 14:13:24 UTC (rev 1233) +++ trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java 2006-12-11 16:01:31 UTC (rev 1234) @@ -244,6 +244,7 @@ * Gets the new names of the desired context names. * The map should contain a key-value pair where the key is * the original key and the value is the new key desired. + * The default implementation returns null. * @return a key-value pair representing the new variable names. */ protected Map getKeyMapping(){ @@ -265,6 +266,7 @@ } recordThisResult(); } + dataDrivableResult.setRowData(vars); stateStorer.setStoreDir(new File(stateStorer.getStoreDir(), getNewStateStoreLocation(rowNum))); try { invokeBody(xmlOut); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java 2006-12-11 14:13:24 UTC (rev 1233) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java 2006-12-11 16:01:31 UTC (rev 1234) @@ -18,6 +18,8 @@ */ package net.sf.jameleon.result; +import java.util.Map; + import net.sf.jameleon.bean.FunctionalPoint; /** @@ -26,6 +28,8 @@ */ public class DataDrivableResult extends TestResultWithChildren { + protected Map rowData; + public DataDrivableResult(FunctionalPoint tag){ super(tag); } @@ -34,6 +38,14 @@ super(tag, parentResults); } + public Map getRowData(){ + return rowData; + } + + public void setRowData(Map rowData){ + this.rowData = rowData; + } + /** * @return a XML String representation of the results */ Added: trunk/jameleon-core/tst/java/net/sf/jameleon/MockTestCase2Tag.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/MockTestCase2Tag.java (rev 0) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/MockTestCase2Tag.java 2006-12-11 16:01:31 UTC (rev 1234) @@ -0,0 +1,18 @@ +package net.sf.jameleon; + +import net.sf.jameleon.result.JameleonTestResult; + +/** + * @jameleon.function name="mock-test-case-2" + */ +public class MockTestCase2Tag extends TestCaseTag { + + protected int invokeChildrenRowNum = -1; + protected JameleonTestResult mockTagDDResult; + + public void invokeChildren(int rowNum, JameleonTestResult result){ + invokeChildrenRowNum = rowNum; + mockTagDDResult = result; + } + +} \ No newline at end of file Property changes on: trunk/jameleon-core/tst/java/net/sf/jameleon/MockTestCase2Tag.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/TestCaseTagTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/TestCaseTagTest.java 2006-12-11 14:13:24 UTC (rev 1233) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/TestCaseTagTest.java 2006-12-11 16:01:31 UTC (rev 1234) @@ -19,6 +19,8 @@ package net.sf.jameleon; import java.io.File; +import java.util.HashMap; +import java.util.Map; import java.util.MissingResourceException; import java.util.Properties; import java.util.ResourceBundle; @@ -98,6 +100,28 @@ public void tearDown(){ Configurator.clearInstance(); } + + public void testExecuteDrivableRow() throws Exception{ + MockTestCase2Tag mTct = new MockTestCase2Tag(); + mTct.setContext(new JellyContext()); + mTct.initResults(); + assertEquals("verify default value",-1, mTct.invokeChildrenRowNum); + assertNull("verify default value", mTct.mockTagDDResult); + Map vars = new HashMap(); + vars.put("var1", "val1"); + vars.put("var2", "val2"); + vars.put("var3", "val3"); + mTct.addVariablesToRowData(vars); + mTct.executeDrivableRow(1); + assertEquals("rowNum after call", 1, mTct.invokeChildrenRowNum); + assertNotNull("dd result after call", mTct.mockTagDDResult); + assertTrue("dd result should be the same", mTct.ddResult == mTct.mockTagDDResult); + Map rowData = mTct.ddResult.getRowData(); + assertEquals("# of row variables", 3, rowData.size()); + assertEquals("row variable 1", "val1", rowData.get("var1")); + assertEquals("row variable 2", "val2", rowData.get("var2")); + assertEquals("row variable 3", "val3", rowData.get("var3")); + } public void testSetLocationAware(){ LocationAware la = new JameleonScriptException(); Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/data/AbstractDataDrivableTagTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/data/AbstractDataDrivableTagTest.java 2006-12-11 14:13:24 UTC (rev 1233) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/data/AbstractDataDrivableTagTest.java 2006-12-11 16:01:31 UTC (rev 1234) @@ -129,16 +129,17 @@ vars.put("1", "one"); mockDdTag.setUpDataDrivable(); mockDdTag.addVariablesToRowData(vars); - mockDdTag.dataDrivableResult = new DataDrivableResult(null); + DataDrivableResult ddr = new DataDrivableResult(null); + mockDdTag.dataDrivableResult = ddr; mockDdTag.executeDrivableRow(1); assertNotNull("dataDrivableResult should not be null", mockDdTag.dataDrivableResult); + assertTrue("dataDrivableResult should not have changed", ddr == mockDdTag.dataDrivableResult); assertFalse("dataDrivableResult should not be countable", mockDdTag.dataDrivableResult instanceof CountableDataDrivableResult); - DataDrivableResult prevResult = mockDdTag.dataDrivableResult; + assertEquals("row data '1'", vars.get("1"), ddr.getRowData().get("1")); mockDdTag.executeDrivableRow(2); //Since countRow defaults to false, the dataDrivableResult should not have changed since the last execution assertFalse("dataDrivableResult should still not be countable", mockDdTag.dataDrivableResult instanceof CountableDataDrivableResult); - assertTrue("a new result should have been created", prevResult != mockDdTag.dataDrivableResult); - prevResult = mockDdTag.dataDrivableResult; + assertTrue("a new result should have been created", ddr != mockDdTag.dataDrivableResult); mockDdTag.setCountRow(true); mockDdTag.executeDrivableRow(3); assertNotNull("dataDrivableResult should not be null", mockDdTag.dataDrivableResult); Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/result/DataDrivableResultTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/result/DataDrivableResultTest.java 2006-12-11 14:13:24 UTC (rev 1233) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/result/DataDrivableResultTest.java 2006-12-11 16:01:31 UTC (rev 1234) @@ -17,6 +17,8 @@ package net.sf.jameleon.result; import java.io.File; +import java.util.HashMap; +import java.util.Map; import junit.framework.Test; import junit.framework.TestCase; @@ -59,6 +61,14 @@ assertTrue(tag == dr.tag); assertTrue(ddResult == dr.parentResults); } + + public void testGetSetRowData(){ + Map vars = new HashMap(); + vars.put("1", "one"); + vars.put("2", "two"); + ddResult.setRowData(vars); + assertEquals("# of variables in data-drivable vars", 2, ddResult.getRowData().size()); + } public void testToXML(){ FunctionalPoint fp = new FunctionalPoint(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2006-12-11 18:23:49
|
Revision: 1235 http://svn.sourceforge.net/jameleon/?rev=1235&view=rev Author: engrean Date: 2006-12-11 10:23:45 -0800 (Mon, 11 Dec 2006) Log Message: ----------- Added Feature Request #1611902 - Add countRow back into data-drivable results objects Modified Paths: -------------- trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonHTMLLayout.java trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonLayout.java trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonSimpleLayout.java trunk/jameleon-core/src/java/net/sf/jameleon/result/CountableResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/HasChildResults.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCaseResultsFrame.java trunk/jameleon-core/tst/java/net/sf/jameleon/TestCaseTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/AbstractDataDrivableTagTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/DataDrivableResultTest.java Property Changed: ---------------- trunk/jameleon-core/ trunk/jameleon-core/tst/ trunk/jameleon-core/tst/java/ trunk/jameleon-core/tst/java/net/sf/jameleon/ trunk/jameleon-core/tst/java/net/sf/jameleon/data/ trunk/jameleon-core/tst/java/net/sf/jameleon/result/ Property changes on: trunk/jameleon-core ___________________________________________________________________ Name: svn:ignore - .settings .classpath .project Build Dist TestResults.html TestResults.xml + .settings .classpath .project Build Dist TestResults.html TestResults.xml jameleon_test_results Modified: trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java 2006-12-11 16:01:31 UTC (rev 1234) +++ trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java 2006-12-11 18:23:45 UTC (rev 1235) @@ -720,6 +720,7 @@ ddResult = new CountableDataDrivableResult(fp, results); ddResult.copyLocationAwareProperties(this); ddResult.setRowData(rowData); + ddResult.setRowNum(rowNum); stateStorer.setStoreDir(getResultsDir(rowNum)); invokeChildren(rowNum, ddResult); traceMsg("END executing row number "+rowNum); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java 2006-12-11 16:01:31 UTC (rev 1234) +++ trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java 2006-12-11 18:23:45 UTC (rev 1235) @@ -267,6 +267,7 @@ recordThisResult(); } dataDrivableResult.setRowData(vars); + dataDrivableResult.setRowNum(rowNum); stateStorer.setStoreDir(new File(stateStorer.getStoreDir(), getNewStateStoreLocation(rowNum))); try { invokeBody(xmlOut); @@ -413,6 +414,10 @@ return rowData; } + public DataDrivableResult getDataDrivableResult(){ + return dataDrivableResult; + } + ///////////////////////////////////////////////////////// // ResultRecordable Methods // ///////////////////////////////////////////////////////// Modified: trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonHTMLLayout.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonHTMLLayout.java 2006-12-11 16:01:31 UTC (rev 1234) +++ trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonHTMLLayout.java 2006-12-11 18:23:45 UTC (rev 1235) @@ -149,12 +149,14 @@ ErrorResult[] errors = getErrorResults(result); sbuf.append("<table border=\"1\" width=\"100%\" id=\"").append(testCaseName).append("_failed\">"+Layout.LINE_SEP); sbuf.append("<tr>"+Layout.LINE_SEP); + sbuf.append("<th>Row</th>"+Layout.LINE_SEP); sbuf.append("<th>Line</th>"+Layout.LINE_SEP); sbuf.append("<th>Point of Failure</th>"+Layout.LINE_SEP); sbuf.append("<th>Reason</th>"+Layout.LINE_SEP); sbuf.append("</tr>"+Layout.LINE_SEP); - for ( int i = 0; errors != null && i < errors.length; i++) { + for ( int i = 0; errors != null && i < errors.length; i++) { sbuf.append("<tr class=\"fail\" id=\"line_").append(errors[i].lineNum).append("\">"+Layout.LINE_SEP); + sbuf.append("<td title=\"Row Failed\">").append(errors[i].rowNum).append("</td>"+Layout.LINE_SEP); sbuf.append("<td title=\"Line Failed\">").append(errors[i].lineNum).append("</td>"+Layout.LINE_SEP); sbuf.append("<td title=\"FunctionId of Point of Failure\"><i>").append(errors[i].functionId).append("</i></td>"+Layout.LINE_SEP); sbuf.append("<td title=\"Error Message\">"+Layout.LINE_SEP); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonLayout.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonLayout.java 2006-12-11 16:01:31 UTC (rev 1234) +++ trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonLayout.java 2006-12-11 18:23:45 UTC (rev 1235) @@ -23,6 +23,7 @@ import java.util.Iterator; import java.util.List; +import net.sf.jameleon.result.DataDrivableResult; import net.sf.jameleon.result.JameleonTestResult; import net.sf.jameleon.result.TestCaseResult; import net.sf.jameleon.util.JameleonUtility; @@ -59,7 +60,7 @@ JameleonTestResult tr; String errorMsg = null, errorFileName = null, functionId = null; //Code place-holder until I can refactor the row num thing. - Integer rowNum = new Integer(1); + Integer rowNum = new Integer(0); Integer lineNum = new Integer(-1); Iterator it = testResults.iterator(); for (int i = 0; it.hasNext(); i++) { @@ -70,11 +71,21 @@ errorMsg = tr.getErrorMsg(); functionId = tr.getIdentifier(); lineNum = new Integer(tr.getLineNumber()); + rowNum = getFailedRowNum(tr); errors[i] = new ErrorResult(errorMsg, errorFileName, functionId, rowNum, lineNum); } return errors; } + protected Integer getFailedRowNum(JameleonTestResult result){ + int rowNum = 0; + DataDrivableResult ddr = (DataDrivableResult)result.findAncestorByClass(DataDrivableResult.class); + if (ddr != null){ + rowNum = ddr.getRowNum(); + } + return new Integer(rowNum); + } + protected List getCountableResults(TestCaseResult result){ return result.getCountableResults(); } Modified: trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonSimpleLayout.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonSimpleLayout.java 2006-12-11 16:01:31 UTC (rev 1234) +++ trunk/jameleon-core/src/java/net/sf/jameleon/logging/JameleonSimpleLayout.java 2006-12-11 18:23:45 UTC (rev 1235) @@ -59,6 +59,7 @@ for ( int i = 0; errors != null && i < errors.length; i++) { sbuf.append("FunctionId: ").append(errors[i].functionId).append(Layout.LINE_SEP); sbuf.append("Line #: ").append(errors[i].lineNum).append(Layout.LINE_SEP); + sbuf.append("Row #: ").append(errors[i].rowNum).append(Layout.LINE_SEP); sbuf.append("Error Message: "); sbuf.append(Transform.escapeTags(errors[i].errMsg)); sbuf.append("\n"); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/CountableResult.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/CountableResult.java 2006-12-11 16:01:31 UTC (rev 1234) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/CountableResult.java 2006-12-11 18:23:45 UTC (rev 1235) @@ -23,6 +23,13 @@ * Describes a result that is countable */ public interface CountableResult { + /** + * Mark this result a failed + */ public void countFailure(); + /** + * Get whether this result failed or not + * @return true if the result failed + */ public boolean isCountableResultFailed(); } Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java 2006-12-11 16:01:31 UTC (rev 1234) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java 2006-12-11 18:23:45 UTC (rev 1235) @@ -28,6 +28,13 @@ */ public class DataDrivableResult extends TestResultWithChildren { + /** + * The row number of exeuction for the data-drivable tag + */ + protected int rowNum; + /** + * The row data for the data-drivable tag + */ protected Map rowData; public DataDrivableResult(FunctionalPoint tag){ @@ -46,6 +53,14 @@ this.rowData = rowData; } + public int getRowNum(){ + return rowNum; + } + + public void setRowNum(int rowNum){ + this.rowNum = rowNum; + } + /** * @return a XML String representation of the results */ Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/HasChildResults.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/HasChildResults.java 2006-12-11 16:01:31 UTC (rev 1234) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/HasChildResults.java 2006-12-11 18:23:45 UTC (rev 1235) @@ -62,7 +62,6 @@ public void setFailed(); /** * Adds a failed result - * */ public void addFailedResult(JameleonTestResult result); /** Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCaseResultsFrame.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCaseResultsFrame.java 2006-12-11 16:01:31 UTC (rev 1234) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/TestCaseResultsFrame.java 2006-12-11 18:23:45 UTC (rev 1235) @@ -56,6 +56,7 @@ import net.sf.jameleon.event.TestCaseEvent; import net.sf.jameleon.event.TestCaseListener; import net.sf.jameleon.function.FunctionTag; +import net.sf.jameleon.result.DataDrivableResult; import net.sf.jameleon.result.FunctionResult; import net.sf.jameleon.result.JameleonTestResult; import net.sf.jameleon.result.TestCaseResult; @@ -176,7 +177,7 @@ tcTable.getSelectionModel().addListSelectionListener(new TCResultsSelectionListeners()); - tcReasonModel = new DefaultTableModel(new Object[]{"Line", " ", "Function Id", "Failed Reason","."},0) { + tcReasonModel = new DefaultTableModel(new Object[]{"Row", "Line", " ", "Function Id", "Failed Reason","."},0) { public Class getColumnClass(int columnIndex) { Class dataType = super.getColumnClass(columnIndex); if (columnIndex == TCResultsSelectionListeners.URL) { @@ -197,7 +198,8 @@ ImageIcon icon = (ImageIcon)getValueAt(rowIndex, colIndex); tip = icon.getDescription(); } else { - tip = super.getToolTipText(e); + Object obj = getValueAt(rowIndex, colIndex); + tip = obj.toString(); } return tip; } @@ -205,6 +207,7 @@ tcReasonTable.addMouseListener(new FTResultsMouseListener()); + tcReasonTable.getColumn("Row").setMaxWidth(40); tcReasonTable.getColumn("Line").setMaxWidth(40); tcReasonTable.getColumn(".").setMaxWidth(0); tcReasonTable.getColumn(" ").setMaxWidth(20); @@ -352,7 +355,7 @@ checkForStop(ft.getTestCaseTag()); FunctionResult fr = ft.getFunctionResults(); if (fr.failed() && tcTable.getSelectedRow() == -1) { - Object[] row = new Object[5]; + Object[] row = new Object[6]; row[TCResultsSelectionListeners.LINE] = new Integer(fr.getLineNumber()); if (fr.getErrorFile() != null) { row[TCResultsSelectionListeners.URL] = snapShotImg; @@ -360,6 +363,7 @@ row[TCResultsSelectionListeners.FUNCTION_ID] = fr.getIdentifier(); row[TCResultsSelectionListeners.ERR_MSG] = fr.getErrorMsg(); row[TCResultsSelectionListeners.OBJECT] = fr; + row[TCResultsSelectionListeners.ROW] = getFailedRowNum(fr); tcReasonModel.addRow(row); } @@ -422,16 +426,28 @@ } } } + + protected Integer getFailedRowNum(JameleonTestResult result){ + int rowNum = 0; + DataDrivableResult ddr = (DataDrivableResult)result.findAncestorByClass(DataDrivableResult.class); + if (ddr != null){ + rowNum = ddr.getRowNum(); + } + return new Integer(rowNum); + } + /////////////////////////////////////////////////////////////////////////////// // Event Listeners // /////////////////////////////////////////////////////////////////////////////// public class TCResultsSelectionListeners implements ListSelectionListener{ - protected static final int LINE = 0; - protected static final int URL = 1; - protected static final int FUNCTION_ID = 2; - protected static final int ERR_MSG = 3; - protected static final int OBJECT = 4; + protected static final int ROW = 0; + protected static final int LINE = 1; + protected static final int URL = 2; + protected static final int FUNCTION_ID = 3; + protected static final int ERR_MSG = 4; + protected static final int OBJECT = 5; + /** * Called whenever the value of the selection changes. * @param e the event that characterizes the change. @@ -443,7 +459,7 @@ TestCaseTag tct = (TestCaseTag)tcTable.getModel().getValueAt(selectedRow, TC); TestCaseResult result = tct.getResults(); if (result.failed()) { - Object[] row = new Object[5]; + Object[] row = new Object[6]; List failedResults = result.getFailedResults(); Iterator it = failedResults.iterator(); JameleonTestResult tr; @@ -456,12 +472,14 @@ } row[ERR_MSG] = tr.getError().getMessage(); row[OBJECT] = tr; + row[ROW] = getFailedRowNum(tr); tcReasonModel.addRow(row); } } } + } - + } public class FTResultsSelectionListeners implements ListSelectionListener{ Property changes on: trunk/jameleon-core/tst ___________________________________________________________________ Name: svn:ignore + _tmp Property changes on: trunk/jameleon-core/tst/java ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/jameleon-core/tst/java/net/sf/jameleon ___________________________________________________________________ Name: svn:ignore + *.class Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/TestCaseTagTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/TestCaseTagTest.java 2006-12-11 16:01:31 UTC (rev 1234) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/TestCaseTagTest.java 2006-12-11 18:23:45 UTC (rev 1235) @@ -112,10 +112,11 @@ vars.put("var2", "val2"); vars.put("var3", "val3"); mTct.addVariablesToRowData(vars); - mTct.executeDrivableRow(1); - assertEquals("rowNum after call", 1, mTct.invokeChildrenRowNum); + mTct.executeDrivableRow(2); + assertEquals("rowNum after call", 2, mTct.invokeChildrenRowNum); assertNotNull("dd result after call", mTct.mockTagDDResult); assertTrue("dd result should be the same", mTct.ddResult == mTct.mockTagDDResult); + assertEquals("row number", 2, mTct.ddResult.getRowNum()); Map rowData = mTct.ddResult.getRowData(); assertEquals("# of row variables", 3, rowData.size()); assertEquals("row variable 1", "val1", rowData.get("var1")); Property changes on: trunk/jameleon-core/tst/java/net/sf/jameleon/data ___________________________________________________________________ Name: svn:ignore + AbstractDataDrivableTagTest.class Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/data/AbstractDataDrivableTagTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/data/AbstractDataDrivableTagTest.java 2006-12-11 16:01:31 UTC (rev 1234) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/data/AbstractDataDrivableTagTest.java 2006-12-11 18:23:45 UTC (rev 1235) @@ -75,7 +75,6 @@ assertFalse("result should not be countable", mockDdTag.createNewResult() instanceof CountableDataDrivableResult); mockDdTag.countRow = true; assertTrue("result should not be countable", mockDdTag.createNewResult() instanceof CountableDataDrivableResult); - } public void testSetUpDataDrivable(){ @@ -100,6 +99,12 @@ mockDdTag.setUpDataDrivable(); } + public void testGetDataDrivableResult(){ + DataDrivableResult ddr = new DataDrivableResult(null); + mockDdTag.dataDrivableResult = ddr; + assertTrue(ddr == mockDdTag.getDataDrivableResult()); + } + public void testAddVariablesToRowData(){ Map vars = new HashMap(); vars.put("1", "one"); @@ -122,7 +127,7 @@ mockDdTag.executeDrivableRow(2); mockScript.verify(); } - + public void testExecuteDrivableRowNullDataDrivableResult(){ assertNull("dataDrivableResult should be null", mockDdTag.dataDrivableResult); Map vars = new HashMap(); @@ -136,14 +141,19 @@ assertTrue("dataDrivableResult should not have changed", ddr == mockDdTag.dataDrivableResult); assertFalse("dataDrivableResult should not be countable", mockDdTag.dataDrivableResult instanceof CountableDataDrivableResult); assertEquals("row data '1'", vars.get("1"), ddr.getRowData().get("1")); + assertEquals("row #", 1, ddr.getRowNum()); mockDdTag.executeDrivableRow(2); + DataDrivableResult ddr2 = mockDdTag.getDataDrivableResult(); //Since countRow defaults to false, the dataDrivableResult should not have changed since the last execution assertFalse("dataDrivableResult should still not be countable", mockDdTag.dataDrivableResult instanceof CountableDataDrivableResult); assertTrue("a new result should have been created", ddr != mockDdTag.dataDrivableResult); + assertEquals("row #", 2, ddr2.getRowNum()); mockDdTag.setCountRow(true); mockDdTag.executeDrivableRow(3); + ddr2 = mockDdTag.getDataDrivableResult(); assertNotNull("dataDrivableResult should not be null", mockDdTag.dataDrivableResult); assertTrue("dataDrivableResult should be countable", mockDdTag.dataDrivableResult instanceof CountableDataDrivableResult); + assertEquals("row #", 3, ddr2.getRowNum()); } } Property changes on: trunk/jameleon-core/tst/java/net/sf/jameleon/result ___________________________________________________________________ Name: svn:ignore + *.class Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/result/DataDrivableResultTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/result/DataDrivableResultTest.java 2006-12-11 16:01:31 UTC (rev 1234) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/result/DataDrivableResultTest.java 2006-12-11 18:23:45 UTC (rev 1235) @@ -62,6 +62,13 @@ assertTrue(ddResult == dr.parentResults); } + public void testGetSetRowNum(){ + ddResult.setRowNum(1); + assertEquals("rowNum", 1, ddResult.getRowNum()); + ddResult.setRowNum(2); + assertEquals("rowNum", 2, ddResult.getRowNum()); + } + public void testGetSetRowData(){ Map vars = new HashMap(); vars.put("1", "one"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2006-12-13 14:52:40
|
Revision: 1245 http://svn.sourceforge.net/jameleon/?rev=1245&view=rev Author: engrean Date: 2006-12-13 06:52:39 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Factor out the Panel creation logic for the Jameleon Tags tab. Modified Paths: -------------- trunk/jameleon-core/src/java/net/sf/jameleon/ui/JameleonUI.java trunk/jameleon-core/tst/java/net/sf/jameleon/ui/FunctionalPointTreeTest.java Added Paths: ----------- trunk/jameleon-core/src/java/net/sf/jameleon/ui/JameleonTagsPanel.java Added: trunk/jameleon-core/src/java/net/sf/jameleon/ui/JameleonTagsPanel.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/JameleonTagsPanel.java (rev 0) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/JameleonTagsPanel.java 2006-12-13 14:52:39 UTC (rev 1245) @@ -0,0 +1,192 @@ +/* + Jameleon - An automation testing tool.. + Copyright (C) 2006 Christian W. Hargraves (en...@ho...) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +package net.sf.jameleon.ui; + +import java.awt.Color; +import java.awt.Dimension; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; + +import javax.swing.JEditorPane; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.SpringLayout; +import javax.swing.table.DefaultTableModel; +import javax.swing.text.html.HTMLEditorKit; + +import net.sf.jameleon.bean.Attribute; +import net.sf.jameleon.bean.FunctionalPoint; + +public class JameleonTagsPanel extends JPanel implements FPDisplayer { + protected JTextField tagNameF = new JTextField(15); + protected JTextField typeF = new JTextField(15); + protected JTextField authorF = new JTextField(15); + + protected JEditorPane descriptionF = new JEditorPane(); + protected JEditorPane stepsF = new JEditorPane(); + protected DefaultTableModel attributeData = new AttributeTableModel(new Object[]{"Variable Name","Description", "Type","Required","Default Value"},0); + + protected JTable attributesT = new SortableJTable(new TableSorter(attributeData)); + protected static final int FIELD_WIDTH = 350; + protected static final int DESC_HEIGHT = 65; + protected static final int TABLE_HEIGHT = 80; + + public JameleonTagsPanel() { + super(); + setUpFunctionalPointFields(); + final JLabel tagNameL = new JLabel("Tag Name(s):"); + final JLabel typeL = new JLabel("Type:"); + final JLabel authorL = new JLabel("Author:"); + final JLabel descriptionL = new JLabel("Use:"); + final JLabel stepsL = new JLabel("Steps:"); + final JLabel attributesL = new JLabel("Atributes:"); + + SpringLayout fpSpringLayout = new SpringLayout(); + JScrollPane descScrollPane = new JScrollPane(descriptionF); + JScrollPane stepsScrollPane = new JScrollPane(stepsF); + JScrollPane attsScrollPane = new JScrollPane(attributesT); + + setLayout(fpSpringLayout); + add(tagNameL); + tagNameL.setLabelFor(tagNameF); + tagNameF.setMaximumSize(new Dimension(Integer.MAX_VALUE, 5)); + add(tagNameF); + add(typeL); + typeF.setMaximumSize(new Dimension(Integer.MAX_VALUE, 5)); + typeL.setLabelFor(typeF); + add(typeF); + add(authorL); + authorF.setMaximumSize(new Dimension(Integer.MAX_VALUE, 5)); + authorL.setLabelFor(authorF); + add(authorF); + add(descriptionL); + descScrollPane.setMinimumSize(new Dimension(FIELD_WIDTH, DESC_HEIGHT)); + descScrollPane.setPreferredSize(new Dimension(FIELD_WIDTH, DESC_HEIGHT)); + descriptionL.setLabelFor(descScrollPane); + add(descScrollPane); + add(stepsL); + stepsL.setLabelFor(stepsScrollPane); + stepsScrollPane.setMinimumSize(new Dimension(FIELD_WIDTH, DESC_HEIGHT)); + stepsScrollPane.setPreferredSize(new Dimension(FIELD_WIDTH, DESC_HEIGHT)); + add(stepsScrollPane); + + add(attributesL); + + attributesT.getColumn("Required").setMaxWidth(55); + attributesL.setLabelFor(attsScrollPane); + attsScrollPane.setMinimumSize(new Dimension(FIELD_WIDTH, TABLE_HEIGHT)); + attsScrollPane.setPreferredSize(new Dimension(FIELD_WIDTH, TABLE_HEIGHT)); + add(attsScrollPane); + } + + protected void setUpFunctionalPointFields(){ + descriptionF.setEditable(false); + descriptionF.setEditorKit(new HTMLEditorKit()); + stepsF.setEditable(false); + stepsF.setEditorKit(new HTMLEditorKit()); + tagNameF.setEditable(false); + tagNameF.setBackground(Color.white); + tagNameF.setBorder(descriptionF.getBorder()); + typeF.setEditable(false); + typeF.setBackground(Color.white); + typeF.setBorder(descriptionF.getBorder()); + authorF.setEditable(false); + authorF.setBackground(Color.white); + authorF.setBorder(descriptionF.getBorder()); + } + + public void sendFunctionalPointInfoToUI(FunctionalPoint fp){ + StringBuffer tagNames = new StringBuffer(); + List tagNamesList = fp.getTagNames(); + Iterator it = tagNamesList.iterator(); + String tag; + while (it.hasNext()) { + tag = (String)it.next(); + tagNames.append("<").append(tag).append("/> "); + } + tagNameF.setText(tagNames.toString()); + typeF.setText(fp.getType()); + authorF.setText(fp.getAuthor()); + descriptionF.setText("<font size='-1'>"+fp.getDescription()+"</font>"); + descriptionF.setCaretPosition(0); + //Remove previous rows. + stepsF.setText(""); + while (attributeData.getRowCount() > 0) { + attributeData.removeRow(0); + } + LinkedList steps = fp.getSteps(); + it = steps.iterator(); + StringBuffer stepsS = new StringBuffer("<font size='-1'>"); + String step; + int indexSteps = 0; + while (it.hasNext()) { + step = (String)it.next(); + stepsS.append((++indexSteps)+". "+step).append("<br>"); + } + stepsS.append("</font>"); + stepsF.setText(stepsS.toString()); + stepsF.setCaretPosition(0); + it = fp.getAttributes().keySet().iterator(); + Attribute att = null; + Object[] attRow = new Object[5]; + String defaultValue = ""; + while (it.hasNext()) { + att = (Attribute)fp.getAttributes().get(it.next()); + attRow[0] = att.getName(); + attRow[1] = att.getDescription(); + attRow[2] = att.getType(); + attRow[3] = new Boolean(att.isRequired()); + if (att.getDefaultValue() != null) { + defaultValue = att.getDefaultValue(); + }else{ + defaultValue = ""; + } + attRow[4] = defaultValue; + attributeData.addRow(attRow); + } + } + + protected class AttributeTableModel extends DefaultTableModel{ + + final int REQUIRED = 3; + + public AttributeTableModel(Object[] data, int rows){ + super(data, rows); + } + + /** + * Returns <code>Object.class</code> regardless of <code>columnIndex</code>. + * + * @param columnIndex the column being queried + * @return the Object.class + */ + public Class getColumnClass(int columnIndex) { + Class dataType = super.getColumnClass(columnIndex); + if (columnIndex == REQUIRED) { + dataType = Boolean.class; + } + return dataType; + } + } + +} Property changes on: trunk/jameleon-core/src/java/net/sf/jameleon/ui/JameleonTagsPanel.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ui/JameleonUI.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/JameleonUI.java 2006-12-12 17:01:15 UTC (rev 1244) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/JameleonUI.java 2006-12-13 14:52:39 UTC (rev 1245) @@ -19,18 +19,12 @@ package net.sf.jameleon.ui; import java.awt.CardLayout; -import java.awt.Color; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import javax.swing.JEditorPane; import javax.swing.JFrame; -import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; @@ -38,35 +32,16 @@ import javax.swing.JScrollPane; import javax.swing.JSplitPane; import javax.swing.JTabbedPane; -import javax.swing.JTable; -import javax.swing.JTextField; -import javax.swing.SpringLayout; import javax.swing.SwingUtilities; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import javax.swing.table.DefaultTableModel; -import javax.swing.text.html.HTMLEditorKit; -import net.sf.jameleon.bean.Attribute; -import net.sf.jameleon.bean.FunctionalPoint; import net.sf.jameleon.launch.JameleonMain; -public class JameleonUI extends JFrame implements FPDisplayer, JameleonMain{ +public class JameleonUI extends JFrame implements JameleonMain{ - protected JTextField tagNameF = new JTextField(15); - protected JTextField typeF = new JTextField(15); - protected JTextField authorF = new JTextField(15); - - protected JEditorPane descriptionF = new JEditorPane(); - protected JEditorPane stepsF = new JEditorPane(); - protected DefaultTableModel attributeData = new AttributeTableModel(new Object[]{"Variable Name","Description", "Type","Required","Default Value"},0); - - protected JTable attributesT = new SortableJTable(new TableSorter(attributeData)); - protected static final int FIELD_WIDTH = 350; - protected static final int DESC_HEIGHT = 65; - protected static final int TABLE_HEIGHT = 80; - protected static final int TREE_TABS_WIDTH = 195; - protected static final int WINDOW_HEIGHT = 450; + protected static final int TREE_TABS_WIDTH = 195; + protected static final int WINDOW_HEIGHT = 450; protected static final int WINDOW_WIDHT = 600; protected String title = "Jameleon"; @@ -101,16 +76,16 @@ } public void genUI(){ - JPanel fpPanel = createFunctionalPointTab(); + JameleonTagsPanel jtPanel = new JameleonTagsPanel(); final JPanel rightPanels = new JPanel(new CardLayout()); final TestCasePane tcPanel = new TestCasePane(this); rightPanels.add(tcPanel, "Test Cases"); - rightPanels.add(fpPanel, "Function Tags"); + rightPanels.add(jtPanel, "Function Tags"); rightPanels.setPreferredSize(new Dimension(WINDOW_WIDHT, WINDOW_HEIGHT)); - SpringUtilities.makeCompactGrid(fpPanel, + SpringUtilities.makeCompactGrid(jtPanel, 6, 2, //rows, cols 6, 6, //initX, initY 6, 6); //xPad, yPad @@ -124,7 +99,7 @@ treeTabs.addTab("Test Cases", sp2); genMenu(tct); - FunctionalPointTree jt = new FunctionalPointTree(this); + FunctionalPointTree jt = new FunctionalPointTree(jtPanel); JScrollPane sp = new JScrollPane(jt); treeTabs.addTab("Function Tags", sp); @@ -170,145 +145,4 @@ setJMenuBar(menuBar); } - protected JPanel createFunctionalPointTab(){ - setUpFunctionalPointFields(); - final JLabel tagNameL = new JLabel("Tag Name(s):"); - final JLabel typeL = new JLabel("Type:"); - final JLabel authorL = new JLabel("Author:"); - final JLabel descriptionL = new JLabel("Use:"); - final JLabel stepsL = new JLabel("Steps:"); - final JLabel attributesL = new JLabel("Atributes:"); - - JPanel fpPanel = new JPanel(); - SpringLayout fpSpringLayout = new SpringLayout(); - JScrollPane descScrollPane = new JScrollPane(descriptionF); - JScrollPane stepsScrollPane = new JScrollPane(stepsF); - JScrollPane attsScrollPane = new JScrollPane(attributesT); - - fpPanel.setLayout(fpSpringLayout); - fpPanel.add(tagNameL); - tagNameL.setLabelFor(tagNameF); - tagNameF.setMaximumSize(new Dimension(Integer.MAX_VALUE, 5)); - fpPanel.add(tagNameF); - fpPanel.add(typeL); - typeF.setMaximumSize(new Dimension(Integer.MAX_VALUE, 5)); - typeL.setLabelFor(typeF); - fpPanel.add(typeF); - fpPanel.add(authorL); - authorF.setMaximumSize(new Dimension(Integer.MAX_VALUE, 5)); - authorL.setLabelFor(authorF); - fpPanel.add(authorF); - fpPanel.add(descriptionL); - descScrollPane.setMinimumSize(new Dimension(FIELD_WIDTH, DESC_HEIGHT)); - descScrollPane.setPreferredSize(new Dimension(FIELD_WIDTH, DESC_HEIGHT)); - descriptionL.setLabelFor(descScrollPane); - fpPanel.add(descScrollPane); - fpPanel.add(stepsL); - stepsL.setLabelFor(stepsScrollPane); - stepsScrollPane.setMinimumSize(new Dimension(FIELD_WIDTH, DESC_HEIGHT)); - stepsScrollPane.setPreferredSize(new Dimension(FIELD_WIDTH, DESC_HEIGHT)); - fpPanel.add(stepsScrollPane); - - fpPanel.add(attributesL); - - attributesT.getColumn("Required").setMaxWidth(55); - attributesL.setLabelFor(attsScrollPane); - attsScrollPane.setMinimumSize(new Dimension(FIELD_WIDTH, TABLE_HEIGHT)); - attsScrollPane.setPreferredSize(new Dimension(FIELD_WIDTH, TABLE_HEIGHT)); - fpPanel.add(attsScrollPane); - return fpPanel; - } - - protected void setUpFunctionalPointFields(){ - descriptionF.setEditable(false); - descriptionF.setEditorKit(new HTMLEditorKit()); - stepsF.setEditable(false); - stepsF.setEditorKit(new HTMLEditorKit()); - tagNameF.setEditable(false); - tagNameF.setBackground(Color.white); - tagNameF.setBorder(descriptionF.getBorder()); - typeF.setEditable(false); - typeF.setBackground(Color.white); - typeF.setBorder(descriptionF.getBorder()); - authorF.setEditable(false); - authorF.setBackground(Color.white); - authorF.setBorder(descriptionF.getBorder()); - } - - public void sendFunctionalPointInfoToUI(FunctionalPoint fp){ - StringBuffer tagNames = new StringBuffer(); - List tagNamesList = fp.getTagNames(); - Iterator it = tagNamesList.iterator(); - String tag; - while (it.hasNext()) { - tag = (String)it.next(); - tagNames.append("<").append(tag).append("/> "); - } - tagNameF.setText(tagNames.toString()); - typeF.setText(fp.getType()); - authorF.setText(fp.getAuthor()); - descriptionF.setText("<font size='-1'>"+fp.getDescription()+"</font>"); - descriptionF.setCaretPosition(0); - //Remove previous rows. - stepsF.setText(""); - while (attributeData.getRowCount() > 0) { - attributeData.removeRow(0); - } - LinkedList steps = fp.getSteps(); - it = steps.iterator(); - StringBuffer stepsS = new StringBuffer("<font size='-1'>"); - String step; - int indexSteps = 0; - while (it.hasNext()) { - step = (String)it.next(); - stepsS.append((++indexSteps)+". "+step).append("<br>"); - } - stepsS.append("</font>"); - stepsF.setText(stepsS.toString()); - stepsF.setCaretPosition(0); - it = fp.getAttributes().keySet().iterator(); - Attribute att = null; - Object[] attRow = new Object[5]; - String defaultValue = ""; - while (it.hasNext()) { - att = (Attribute)fp.getAttributes().get(it.next()); - attRow[0] = att.getName(); - attRow[1] = att.getDescription(); - attRow[2] = att.getType(); - attRow[3] = new Boolean(att.isRequired()); - if (att.getDefaultValue() != null) { - defaultValue = att.getDefaultValue(); - }else{ - defaultValue = ""; - } - attRow[4] = defaultValue; - attributeData.addRow(attRow); - } - } - - - protected class AttributeTableModel extends DefaultTableModel{ - - final int REQUIRED = 3; - - public AttributeTableModel(Object[] data, int rows){ - super(data, rows); - } - - /** - * Returns <code>Object.class</code> regardless of <code>columnIndex</code>. - * - * @param columnIndex the column being queried - * @return the Object.class - */ - public Class getColumnClass(int columnIndex) { - Class dataType = super.getColumnClass(columnIndex); - if (columnIndex == REQUIRED) { - dataType = Boolean.class; - } - return dataType; - } - } - - } Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/ui/FunctionalPointTreeTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/ui/FunctionalPointTreeTest.java 2006-12-12 17:01:15 UTC (rev 1244) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/ui/FunctionalPointTreeTest.java 2006-12-13 14:52:39 UTC (rev 1245) @@ -50,7 +50,7 @@ } public void setUp(){ - ui = new FunctionalPointTree(new JameleonUI("Jameleon Unit Testing")); + ui = new FunctionalPointTree(new JameleonTagsPanel()); root = new DefaultMutableTreeNode("root"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2006-12-13 23:46:04
|
Revision: 1261 http://svn.sourceforge.net/jameleon/?rev=1261&view=rev Author: engrean Date: 2006-12-13 15:46:01 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Add selenium plug-in to the build and add javac source #, including a default value. Modified Paths: -------------- trunk/jameleon-core/build.xml trunk/jameleon-core/src/xml/standard-build.xml.fragment Modified: trunk/jameleon-core/build.xml =================================================================== --- trunk/jameleon-core/build.xml 2006-12-13 21:20:15 UTC (rev 1260) +++ trunk/jameleon-core/build.xml 2006-12-13 23:46:01 UTC (rev 1261) @@ -117,7 +117,7 @@ </antcall> </target> - <target name="build.plugins" depends="build.htmlunit, build.httpunit, build.jagacy, build.jiffie, build.jwebunit"/> + <target name="build.plugins" depends="build.htmlunit, build.httpunit, build.jagacy, build.jiffie, build.jwebunit, build.selenium"/> <target name="clean.htmlunit" description="cleans the htmlunit-plugin"> <ant antfile="../htmlunit-plugin/build.xml" target="clean" inheritAll="false"/> @@ -164,6 +164,9 @@ <exec dir="../jwebunit-plugin" executable="maven.bat"> <arg line="site"/> </exec> + <exec dir="../selenium-plugin" executable="maven.bat"> + <arg line="site"/> + </exec> </target> <target name="package.htdocs" depends="maven.site" description="creates a src release"> @@ -175,9 +178,7 @@ <zipfileset dir="../jagacy-plugin/${docs}" prefix="htdocs/jagacy-plugin"/> <zipfileset dir="../jiffie-plugin/${docs}" prefix="htdocs/jiffie-plugin"/> <zipfileset dir="../jwebunit-plugin/${docs}" prefix="htdocs/jwebunit-plugin"/> -<!-- <zipfileset dir="../selenium-plugin/${docs}" prefix="htdocs/selenium-plugin"/> - --> </zip> </target> @@ -233,6 +234,12 @@ <zipfileset dir="../jwebunit-plugin/lib" prefix="jameleon-test-suite/lib"> <include name="jwebunit*.jar"/> </zipfileset> + <zipfileset dir="../selenium-plugin/${dist.dir}" prefix="jameleon-test-suite/lib"> + <include name="selenium-plugin*.jar"/> + </zipfileset> + <zipfileset dir="../selenium-plugin/lib" prefix="jameleon-test-suite/lib"> + <include name="*.jar"/> + </zipfileset> <zipfileset dir="src/test-suite" prefix="jameleon-test-suite"> <include name="build.xml"/> <include name="upgrade.xml"/> Modified: trunk/jameleon-core/src/xml/standard-build.xml.fragment =================================================================== --- trunk/jameleon-core/src/xml/standard-build.xml.fragment 2006-12-13 21:20:15 UTC (rev 1260) +++ trunk/jameleon-core/src/xml/standard-build.xml.fragment 2006-12-13 23:46:01 UTC (rev 1261) @@ -1,6 +1,7 @@ <property environment="ENV"/> <property file="build.properties" /> + <property name="jdk.version" value="1.4"/> <path id="jameleon.classpath"> <fileset dir="${ENV.JAMELEON_HOME}/lib"> @@ -81,12 +82,13 @@ <target name="build" depends="init" description="This should not be called independently."> - + <javac srcdir="src/java" destdir="${build.dir}" debug="on" deprecation="off" optimize="on" + source="${jdk.version}" classpathref="classpath" failonerror="true"/> </target> @@ -98,6 +100,7 @@ debug="on" deprecation="off" optimize="on" + source="${jdk.version}" failonerror="true"> <classpath> <fileset dir="${dist.dir}"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2007-01-02 20:42:59
|
Revision: 1309 http://svn.sourceforge.net/jameleon/?rev=1309&view=rev Author: engrean Date: 2007-01-02 12:42:53 -0800 (Tue, 02 Jan 2007) Log Message: ----------- Fixed some unit tests that failed only in eclipse. Modified Paths: -------------- trunk/jameleon-core/src/java/net/sf/jameleon/launch/JameleonLauncher.java trunk/jameleon-core/tst/java/net/sf/jameleon/launch/JameleonLauncherTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/util/InstanceSerializerTest.java Property Changed: ---------------- trunk/jameleon-core/ trunk/jameleon-core/tst/java/net/sf/jameleon/launch/ trunk/jameleon-core/tst/java/net/sf/jameleon/util/ Property changes on: trunk/jameleon-core ___________________________________________________________________ Name: svn:ignore - .settings .classpath .project Build Dist TestResults.html TestResults.xml jameleon_test_results + .settings .classpath .project Build Dist TestResults.html TestResults.xml jameleon_test_results jameleon.conf .externalToolBuilders Modified: trunk/jameleon-core/src/java/net/sf/jameleon/launch/JameleonLauncher.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/launch/JameleonLauncher.java 2007-01-02 17:28:16 UTC (rev 1308) +++ trunk/jameleon-core/src/java/net/sf/jameleon/launch/JameleonLauncher.java 2007-01-02 20:42:53 UTC (rev 1309) @@ -124,7 +124,13 @@ File jameleonHome = null; File launcherJar = Locator.getClassSource(getClass()); - File libDir = launcherJar.getParentFile(); + + //Default the lib directory to the location of the launcherJar because the class may not + //be in a jar file. + File libDir = launcherJar; + if (launcherJar.exists() && !launcherJar.isDirectory()){ + libDir = launcherJar.getParentFile(); + } if (jameleonHomeValue != null) { jameleonHome = new File(jameleonHomeValue); Property changes on: trunk/jameleon-core/tst/java/net/sf/jameleon/launch ___________________________________________________________________ Name: svn:ignore + *.class Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/launch/JameleonLauncherTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/launch/JameleonLauncherTest.java 2007-01-02 17:28:16 UTC (rev 1308) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/launch/JameleonLauncherTest.java 2007-01-02 20:42:53 UTC (rev 1309) @@ -41,6 +41,7 @@ File cwd = new File("."); String absolutePath = cwd.getAbsolutePath(); absolutePath = absolutePath.substring(0, absolutePath.length() - 2); + assertEquals("jameleon-launcher location based on jar file", absolutePath, jameleonHome.getAbsolutePath()); assertTrue("jameleon-launcher location based on jar file", absolutePath.equalsIgnoreCase(jameleonHome.getAbsolutePath())); File tstDir = new File(cwd, "tst/java"); System.setProperty(JameleonLauncher.JAMELEON_HOME_PROPERTY, tstDir.getAbsolutePath()); Property changes on: trunk/jameleon-core/tst/java/net/sf/jameleon/util ___________________________________________________________________ Name: svn:ignore + *.class Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/util/InstanceSerializerTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/util/InstanceSerializerTest.java 2007-01-02 17:28:16 UTC (rev 1308) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/util/InstanceSerializerTest.java 2007-01-02 20:42:53 UTC (rev 1309) @@ -25,6 +25,7 @@ import junit.framework.TestSuite; import java.io.File; +import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; import java.io.IOException; @@ -103,15 +104,15 @@ throws IOException, ClassNotFoundException{ fp.setAuthor("Kay"); fp.addStep("Serialize Me"); - // - instanceSer.serialize(fp, new File(JameleonUtility.fixFileSeparators(PACKAGE_DIR+SER_FILE))); + File f = new File(JameleonUtility.fixFileSeparators(PACKAGE_DIR+SER_FILE)); + instanceSer.serialize(fp, f); + assertTrue(f.getAbsolutePath() + " does not exist", f.exists()); //Just to be sure. fp = null; - String fileName = JameleonUtility.fixFileSeparators(SER_FILE); - InputStream pkgStream = getClass().getResourceAsStream(fileName); - fp = (FunctionalPoint)instanceSer.deserialize(pkgStream); + FileInputStream fis = new FileInputStream(f); + fp = (FunctionalPoint)instanceSer.deserialize(fis); assertNotNull("Object should not be null", fp); - assertEquals("Object author is not the same", "Kay", fp.getAuthor()); + assertEquals("Object author", "Kay", fp.getAuthor()); assertEquals("Object steps", 1, fp.getSteps().size()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2007-01-04 17:52:15
|
Revision: 1313 http://svn.sourceforge.net/jameleon/?rev=1313&view=rev Author: engrean Date: 2007-01-04 09:52:12 -0800 (Thu, 04 Jan 2007) Log Message: ----------- Feature Request #1628055 - Improve performance in registering and loading tags and the execute test case tag. Modified Paths: -------------- trunk/jameleon-core/src/java/net/sf/jameleon/ExecuteTestCase.java trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/ExecuteJameleonScriptTag.java trunk/jameleon-core/src/java/net/sf/jameleon/util/InstanceSerializer.java trunk/jameleon-core/src/java/net/sf/jameleon/util/JameleonUtility.java trunk/jameleon-core/tst/java/net/sf/jameleon/util/InstanceSerializerTest.java Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ExecuteTestCase.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ExecuteTestCase.java 2007-01-04 17:08:56 UTC (rev 1312) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ExecuteTestCase.java 2007-01-04 17:52:12 UTC (rev 1313) @@ -77,6 +77,7 @@ */ protected static final String US = new String("\n_______________________________________________________________\n"); protected final Logger log = Logger.getLogger(ExecuteTestCase.class.getName()); + protected final static TestCaseTagLibrary tagLibrary = new TestCaseTagLibrary(); /** * The jameleon.conf configuration name for a list of desired TestCaseListeners to be registered. */ @@ -266,7 +267,7 @@ } JellyContext scriptContext = null; try{ - context.registerTagLibrary("jelly:jameleon", new TestCaseTagLibrary()); + context.registerTagLibrary("jelly:jameleon", tagLibrary); setContextVariables(context); scriptContext = context.runScript(file, out); }finally{ Modified: trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/ExecuteJameleonScriptTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/ExecuteJameleonScriptTag.java 2007-01-04 17:08:56 UTC (rev 1312) +++ trunk/jameleon-core/src/java/net/sf/jameleon/plugin/junit/ExecuteJameleonScriptTag.java 2007-01-04 17:52:12 UTC (rev 1313) @@ -169,8 +169,7 @@ protected Appender htmlWriter; protected Appender xmlWriter; protected Appender stdoutWriter; - protected SAXReader htmlParser; - protected Document parsedHtml; + protected static SAXReader parser = new SAXReader(); protected Layout originalLayout; protected Layout originalHtmlLayout; protected TestCaseResult result; @@ -255,7 +254,6 @@ public void setup(){ postcondition = true; denyAll = new DenyAllFilter(); - htmlParser = new SAXReader(); jmln = new ExecuteTestCase(DEBUG); jmln.setScriptName2StdOut(false); testCaseResults = new StringWriter(); @@ -297,8 +295,6 @@ } public void tearDown(){ - htmlParser = null; - parsedHtml = null; LoggerRepository repos = LogManager.getLoggerRepository(); Logger base = repos.getLogger("net.sf.jameleon"); base.removeAppender(xmlWriter); @@ -329,16 +325,6 @@ protected String executeScript(){ String errMsg = jmln.executeJellyScript(script); - //this is a hack to basically count each time this method is called as a test case execution. - //The problem is the TestCaseTag increments this once no matter what, making it one more than - //what actually was executed. -/* - if (tct.getResults().getRowsExecuted() == 1 && !getVariableAsBoolean("rowsExecutedSet")) { - tct.getResults().setRowsExecuted(0); - setVariable("rowsExecutedSet", "true"); - } - tct.getResults().incrementRowsExecuted(); -*/ htmlResults.write("</table></body></html>"); return errMsg; } @@ -448,7 +434,7 @@ } protected FailedRow getHtmlFailedLineNum(String tcName, int lineNum){ - Document pHtml = getParsedHtml(); + Document pHtml = getHtmlDocument(); Node node = pHtml.selectSingleNode( "//tr[@class='fail']["+1+"]/td/table[@id='"+tcName+"_failed']" ); assertNotNull("Couldn't find the find failed row for "+tcName, node); Node failedRow = node.selectSingleNode( "//tr[@id='line_"+lineNum+"']" ); @@ -503,14 +489,27 @@ return value; } - protected Document getParsedHtml(){ + protected Document getHtmlDocument(){ + return getDocument(htmlResults); + } + + protected Document getXmlDocument(){ + return getDocument(testCaseResults); + } + + protected Document getDocument(StringWriter results){ + StringReader sr = new StringReader(results.toString()); + Document doc = null; try{ - parsedHtml = htmlParser.read(new StringReader(htmlResults.toString())); + doc = parser.read(sr); }catch(DocumentException de){ de.printStackTrace(); fail("Error happened executing: "+script.getPath()); + }finally{ + sr.close(); } - return parsedHtml; + return doc; + } protected class FailedRow{ Modified: trunk/jameleon-core/src/java/net/sf/jameleon/util/InstanceSerializer.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/util/InstanceSerializer.java 2007-01-04 17:08:56 UTC (rev 1312) +++ trunk/jameleon-core/src/java/net/sf/jameleon/util/InstanceSerializer.java 2007-01-04 17:52:12 UTC (rev 1313) @@ -28,6 +28,7 @@ public class InstanceSerializer{ + private InstanceSerializer(){} /** * The file extension for serialized files */ @@ -39,7 +40,7 @@ * @param file - the file to serialize the object to * @throws IOException if the file can't be serialized */ - public void serialize(Object obj, File file) throws IOException{ + public static void serialize(Object obj, File file) throws IOException{ ObjectOutputStream s = null; if (file.getParentFile() != null) { JameleonUtility.createDirStructure(file.getParentFile()); @@ -62,7 +63,7 @@ * @throws ClassNotFoundException - If a class corresponding to the serialized file * is not in the Classpath */ - public Object deserialize(String fileName) throws IOException, ClassNotFoundException{ + public static Object deserialize(String fileName) throws IOException, ClassNotFoundException{ return deserialize(new FileInputStream(fileName)); } @@ -73,7 +74,7 @@ * @throws ClassNotFoundException - If a class corresponding to the serialized file * is not in the Classpath */ - public Object deserialize(InputStream in) throws IOException, ClassNotFoundException{ + public static Object deserialize(InputStream in) throws IOException, ClassNotFoundException{ Object obj = null; ObjectInputStream s = null; if (in != null) { Modified: trunk/jameleon-core/src/java/net/sf/jameleon/util/JameleonUtility.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/util/JameleonUtility.java 2007-01-04 17:08:56 UTC (rev 1312) +++ trunk/jameleon-core/src/java/net/sf/jameleon/util/JameleonUtility.java 2007-01-04 17:52:12 UTC (rev 1313) @@ -42,24 +42,30 @@ public static FunctionalPoint loadFunctionalPoint(String className, Object callingClass){ - InstanceSerializer ser = new InstanceSerializer(); FunctionalPoint fpTemp = null; String classNameOrig = className; String className1 = classNameOrig.replace('.',File.separatorChar); className1 = className1+InstanceSerializer.SERIALIZED_EXT; String className2 = classNameOrig.replace('.','/'); className2 = className2+InstanceSerializer.SERIALIZED_EXT; + InputStream is = null; try{ - fpTemp = (FunctionalPoint)ser.deserialize(getInputStream(className1, callingClass)); + is = getInputStream(className1, callingClass); + fpTemp = (FunctionalPoint)InstanceSerializer.deserialize(is); + closeInputStream(is); classNameOrig = className1; if (fpTemp == null) { - fpTemp = (FunctionalPoint)ser.deserialize(getInputStream(className2, callingClass)); + is = getInputStream(className2, callingClass); + fpTemp = (FunctionalPoint)InstanceSerializer.deserialize(is); + closeInputStream(is); classNameOrig = className2; } }catch (IOException ioe){ ioe.printStackTrace(); }catch (ClassNotFoundException cnfe){ cnfe.printStackTrace(); + }finally{ + closeInputStream(is); } if (fpTemp == null) { throw new JameleonScriptException("\nCould not find '"+classNameOrig+"'!\nPlease be sure to execute the Jameleon-provided"+ @@ -68,6 +74,17 @@ } return fpTemp; } + + protected static void closeInputStream(InputStream is){ + try{ + if (is != null){ + is.close(); + } + }catch(IOException e){ + //So what, we couldn't close the connection + //Maybe it was already closed? + } + } public static InputStream getInputStream(String className, Object callingClass){ InputStream input = null; @@ -103,9 +120,7 @@ * @return The formatted <code>msg</code>. */ public static String createErrMsg(String msg) { - StringBuffer str = new StringBuffer(); - str.append(msg); - return str.toString(); + return msg; } /** @@ -116,11 +131,13 @@ */ public static void recordResultsToFile(File f, String content) throws IOException{ createDirStructure(f.getParentFile()); - BufferedWriter out = new BufferedWriter(new FileWriter(f)); + FileWriter fw = new FileWriter(f); + BufferedWriter out = new BufferedWriter(fw); try{ out.write(content); }finally{ out.close(); + fw.close(); } } @@ -134,8 +151,9 @@ public static void recordResultsToFile(File f, String content, String encoding) throws IOException{ createDirStructure(f.getParentFile()); BufferedWriter out = null; + FileOutputStream fos = new FileOutputStream(f); try{ - out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f), encoding)); + out = new BufferedWriter(new OutputStreamWriter(fos, encoding)); }catch(UnsupportedEncodingException ue){ ue.printStackTrace(); //throw new IOException(getStack(ue)); @@ -144,6 +162,7 @@ out.write(content); }finally{ out.close(); + fos.close(); } } Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/util/InstanceSerializerTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/util/InstanceSerializerTest.java 2007-01-04 17:08:56 UTC (rev 1312) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/util/InstanceSerializerTest.java 2007-01-04 17:52:12 UTC (rev 1313) @@ -30,7 +30,6 @@ public class InstanceSerializerTest extends TestCase { - protected InstanceSerializer instanceSer; protected final static String SER_FILE = "foobarFile.txt"; protected final static String PACKAGE_DIR = "tst/java/net/sf/jameleon/util/"; @@ -52,7 +51,6 @@ public void setUp() { File dir = new File("tst/_tmp"); dir.mkdir(); - instanceSer = new InstanceSerializer(); fp = new FunctionalPoint(); } @@ -67,7 +65,7 @@ public void testSerializeWithUncreatedDir() throws IOException{ File f = new File(JameleonUtility.fixFileSeparators("tst/_tmp/serialize/uncreated/someFile.txt")); try{ - instanceSer.serialize(fp, f); + InstanceSerializer.serialize(fp, f); }catch (FileNotFoundException fnfe){ fail("The directory should be auto-created"); }finally{ @@ -78,7 +76,7 @@ public void testSerializeWithNoParentDir() throws Exception{ File f = new File("uncreatedFile.txt"); try{ - instanceSer.serialize(fp, f); + InstanceSerializer.serialize(fp, f); }finally{ f.delete(); } @@ -89,10 +87,10 @@ fp.setAuthor("Kay"); fp.addStep("Serialize Me"); File f = new File(JameleonUtility.fixFileSeparators("tst/_tmp/"+SER_FILE)); - instanceSer.serialize(fp, f); + InstanceSerializer.serialize(fp, f); //Just to be sure. fp = null; - fp = (FunctionalPoint)instanceSer.deserialize(JameleonUtility.fixFileSeparators("tst/_tmp/"+SER_FILE)); + fp = (FunctionalPoint)InstanceSerializer.deserialize(JameleonUtility.fixFileSeparators("tst/_tmp/"+SER_FILE)); assertNotNull("Object should not be null", fp); assertEquals("Object author is not the same", "Kay", fp.getAuthor()); assertEquals("Object steps", 1, fp.getSteps().size()); @@ -103,12 +101,12 @@ fp.setAuthor("Kay"); fp.addStep("Serialize Me"); File f = new File(JameleonUtility.fixFileSeparators(PACKAGE_DIR+SER_FILE)); - instanceSer.serialize(fp, f); + InstanceSerializer.serialize(fp, f); assertTrue(f.getAbsolutePath() + " does not exist", f.exists()); //Just to be sure. fp = null; FileInputStream fis = new FileInputStream(f); - fp = (FunctionalPoint)instanceSer.deserialize(fis); + fp = (FunctionalPoint)InstanceSerializer.deserialize(fis); assertNotNull("Object should not be null", fp); assertEquals("Object author", "Kay", fp.getAuthor()); assertEquals("Object steps", 1, fp.getSteps().size()); @@ -119,10 +117,10 @@ fp.setAuthor("Christian"); fp.addStep("한굴 [Korean]"); File f = new File(JameleonUtility.fixFileSeparators("tst/_tmp/"+SER_FILE)); - instanceSer.serialize(fp, f); + InstanceSerializer.serialize(fp, f); //Just to be sure. fp = null; - fp = (FunctionalPoint)instanceSer.deserialize(JameleonUtility.fixFileSeparators("tst/_tmp/"+SER_FILE)); + fp = (FunctionalPoint)InstanceSerializer.deserialize(JameleonUtility.fixFileSeparators("tst/_tmp/"+SER_FILE)); assertNotNull("Object should not be null", fp); assertEquals("Object author is not the same", "Christian", fp.getAuthor()); assertEquals("Object steps", 1, fp.getSteps().size()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2007-01-04 17:53:34
|
Revision: 1314 http://svn.sourceforge.net/jameleon/?rev=1314&view=rev Author: engrean Date: 2007-01-04 09:53:29 -0800 (Thu, 04 Jan 2007) Log Message: ----------- Feature Request #1627986 - replace xjavadoc with qdox Bug #1627984 - Tag documentation trims all Javadoc whitespace/new lines Modified Paths: -------------- trunk/jameleon-core/build.bat trunk/jameleon-core/build.sh trunk/jameleon-core/project.properties trunk/jameleon-core/project.xml trunk/jameleon-core/src/java/net/sf/jameleon/ant/JameleonXDoclet.java trunk/jameleon-core/src/java/net/sf/jameleon/bean/Javadoc2Bean.java trunk/jameleon-core/src/java/net/sf/jameleon/ui/FunctionalPointTree.java trunk/jameleon-core/tst/java/net/sf/jameleon/ant/JameleonXDocletTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Javadoc2BeanTest.java Added Paths: ----------- trunk/jameleon-core/lib/qdox-1.6.1.jar Modified: trunk/jameleon-core/build.bat =================================================================== --- trunk/jameleon-core/build.bat 2007-01-04 17:52:12 UTC (rev 1313) +++ trunk/jameleon-core/build.bat 2007-01-04 17:53:29 UTC (rev 1314) @@ -17,7 +17,7 @@ set CP=.;%JAMELEON_HOME%/lib/junit.jar;%LIBS%/ant-launcher.jar;"%JAVA_HOME%/lib/tools.jar" set PATH=%PATH%;lib -"%JAVA_HOME%/bin/java" -Xmx128m -Xms64m -classpath %CP% org.apache.tools.ant.launch.Launcher -Dbuild.compiler=%COMPILER% %* +"%JAVA_HOME%/bin/java" -Xmx192m -Xms64m -classpath %CP% org.apache.tools.ant.launch.Launcher -Dbuild.compiler=%COMPILER% %* :end Modified: trunk/jameleon-core/build.sh =================================================================== --- trunk/jameleon-core/build.sh 2007-01-04 17:52:12 UTC (rev 1313) +++ trunk/jameleon-core/build.sh 2007-01-04 17:53:29 UTC (rev 1314) @@ -29,6 +29,6 @@ CP=.:$JAMELEON_HOME/lib/junit.jar:$LIBS/ant-launcher.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:lib fi - "$JAVA_HOME/bin/java" -Xmx128m -Xms32m -classpath $CP org.apache.tools.ant.launch.Launcher -Dbuild.compiler=$COMPILER $* + "$JAVA_HOME/bin/java" -Xmx192m -Xms32m -classpath $CP org.apache.tools.ant.launch.Launcher -Dbuild.compiler=$COMPILER $* fi Added: trunk/jameleon-core/lib/qdox-1.6.1.jar =================================================================== (Binary files differ) Property changes on: trunk/jameleon-core/lib/qdox-1.6.1.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/jameleon-core/project.properties =================================================================== --- trunk/jameleon-core/project.properties 2007-01-04 17:52:12 UTC (rev 1313) +++ trunk/jameleon-core/project.properties 2007-01-04 17:53:29 UTC (rev 1314) @@ -21,7 +21,7 @@ maven.jar.jdic = ${lib.dir}/jdic.jar maven.jar.junit = ${lib.dir}/junit.jar maven.jar.log4j = ${lib.dir}/log4j-1.2.14.jar -maven.jar.xjavadoc = ${lib.dir}/xjavadoc-1.5-snapshot.jar +maven.jar.qdox = ${lib.dir}/qdox-1.6.1.jar maven.jar.velocity = ${lib.dir}/velocity-1.4.jar maven.changes.issue.template = http://sourceforge.net/support/tracker.php?aid=%ISSUE% @@ -33,7 +33,7 @@ maven.javadoc.additionalparam = -J-DproxyHost=${maven.proxy.host} -J-DproxyPort=${maven.proxy.port} maven.javadoc.bottom = Copyright © ${year} Christian Hargraves. All Rights Reserved.<br><img src="http://sourceforge.net/sflogo.php?group_id=84246&type=1"> -maven.javadoc.links = http://java.sun.com/j2se/1.4.2/docs/api/,http://jakarta.apache.org/commons/jelly/apidocs/ +maven.javadoc.links = http://java.sun.com/j2se/1.4.2/docs/api/,http://jakarta.apache.org/commons/jelly/apidocs/ http://qdox.codehaus.org/apidocs/ maven.javadoc.tagletpath = ${dist.dir}/jameleon-core.jar maven.javadoc.taglets = net.sf.jameleon.taglet.JameleonFunctionTaglet,net.sf.jameleon.taglet.JameleonStepTaglet,net.sf.jameleon.taglet.JameleonAttributeTaglet Modified: trunk/jameleon-core/project.xml =================================================================== --- trunk/jameleon-core/project.xml 2007-01-04 17:52:12 UTC (rev 1313) +++ trunk/jameleon-core/project.xml 2007-01-04 17:53:29 UTC (rev 1314) @@ -156,9 +156,9 @@ <version>1.4</version> </dependency> <dependency> - <groupId>xjavadoc</groupId> - <artifactId>xjavadoc</artifactId> - <version>1.5-snapshot</version> + <groupId>qdox</groupId> + <artifactId>qdox</artifactId> + <version>1.6.1</version> </dependency> </dependencies> Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ant/JameleonXDoclet.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ant/JameleonXDoclet.java 2007-01-04 17:52:12 UTC (rev 1313) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ant/JameleonXDoclet.java 2007-01-04 17:53:29 UTC (rev 1314) @@ -18,31 +18,28 @@ */ package net.sf.jameleon.ant; -import net.sf.jameleon.bean.Javadoc2Bean; -import net.sf.jameleon.bean.FunctionalPoint; -import net.sf.jameleon.util.InstanceSerializer; -import net.sf.jameleon.exception.JameleonException; - -import xjavadoc.XClass; -import xjavadoc.ant.XJavadocTask; - -import org.apache.tools.ant.BuildException; - import java.io.File; -import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; - -import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Properties; +import net.sf.jameleon.bean.FunctionalPoint; +import net.sf.jameleon.bean.Javadoc2Bean; +import net.sf.jameleon.exception.JameleonException; +import net.sf.jameleon.util.InstanceSerializer; + +import org.apache.tools.ant.BuildException; + +import com.thoughtworks.qdox.ant.AbstractQdoxTask; +import com.thoughtworks.qdox.model.JavaClass; + /** * An Ant task that registers all functional points (defined in <code>isA</code>, which defaults to * <code>FunctionTag</code>) so they can be recognized by the Jameleon engine. */ -public class JameleonXDoclet extends XJavadocTask{ +public class JameleonXDoclet extends AbstractQdoxTask{ protected File outputDir = null; protected String outputFileName = new String("TestCaseTagDefs.properties"); @@ -88,25 +85,35 @@ * * @exception BuildException Ant's way of reporting exception */ - protected void start() throws BuildException{ + public void execute() throws BuildException{ if (outputDir == null) { throw new BuildException("outputDir must be set to the directory where TestCaseTagDefs.properties will be generated to."); }else if (!outputDir.isDirectory()) { throw new BuildException("outputDir is not a valid directory! Set outputDir to the directory where TestCaseTagDefs.properties will be generated to."); } - Properties props = new Properties(); - j2b = new Javadoc2Bean(getXJavaDoc()); - j2b.setIsA(isA); - Collection classes = getXJavaDoc().getSourceClasses(); - Iterator it = classes.iterator(); - while (it.hasNext()) { - XClass clazz = (XClass)it.next(); - if (clazz != null && clazz.isA(isA)){ - setClassAttributes(clazz,props,j2b); - } + try{ + validateAttributes(); + buildFileMap(); + j2b = new Javadoc2Bean(); + j2b.setIsA(isA); + mergeBuilderSources(j2b); + Properties props = new Properties(); + JavaClass[] classes = j2b.getJavaDocBuilder().getClasses(); + for (int i = 0; i < classes.length; i++) { + setClassAttributes(classes[i],props,j2b); + } + saveTagDefs(props, getTagDefsFileName()); + }catch(RuntimeException re){ + re.printStackTrace(); } - saveTagDefs(props, getTagDefsFileName()); } + + protected void mergeBuilderSources(Javadoc2Bean j2b) { + for (Iterator iterator = fileMap.keySet().iterator(); iterator.hasNext();) { + String sourceFile = (String) iterator.next(); + j2b.getJavaDocBuilder().addSourceTree((File) fileMap.get(sourceFile)); + } + } /** * Simply constructs a file from a String that represents the fully qualified class @@ -142,28 +149,39 @@ * @param props - The properties to save to a file. */ protected void saveTagDefs(Properties props, String fileName) throws BuildException{ + FileOutputStream fos = null; try{ - props.store(new FileOutputStream(fileName),"Function Tag Definitions generated by Jameleon."); + fos = new FileOutputStream(fileName); + props.store(fos,"Function Tag Definitions generated by Jameleon."); }catch(IOException ioe){ throw new BuildException("Could not write to file "+fileName,ioe); + }finally{ + try{ + if (fos != null){ + fos.close(); + } + }catch(IOException ioe){ + ioe.printStackTrace(); + //Couldn't close an output stream? + } } } /** * Set the class-specific attributes */ - protected void setClassAttributes(XClass clazz, Properties props, Javadoc2Bean j2b) throws BuildException{ - String className = clazz.getQualifiedName(); + protected void setClassAttributes(JavaClass clazz, Properties props, Javadoc2Bean j2b) throws BuildException{ + String className = clazz.getFullyQualifiedName(); FunctionalPoint fp = null; try{ fp = j2b.getFunctionalPoint(clazz); - fp.getType(); - } catch (FileNotFoundException fnfe){ - fnfe.printStackTrace(); - //How can this happen? Ant already validates the files before passed here. + if (fp != null){ + //validate that the type is correct + fp.getType(); + } } catch (JameleonException iae){ throw new BuildException(className + ": "+iae.getMessage()); - } + } String warningMsg = "WARNING: "+className+" is a valid function point, but it will NOT be automatically registered! "+ "Please add a @jameleon.function name=\"functionName\" to the class javadocs of the function point"; if (fp != null) { @@ -194,9 +212,8 @@ } protected void serializeFunctionalPoint(FunctionalPoint fp, String className) throws BuildException{ - InstanceSerializer serializer = new InstanceSerializer(); try{ - serializer.serialize(fp,constructFileFromClassName(className)); + InstanceSerializer.serialize(fp,constructFileFromClassName(className)); }catch(IOException ioe){ throw new BuildException(ioe.toString()); } Modified: trunk/jameleon-core/src/java/net/sf/jameleon/bean/Javadoc2Bean.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/bean/Javadoc2Bean.java 2007-01-04 17:52:12 UTC (rev 1313) +++ trunk/jameleon-core/src/java/net/sf/jameleon/bean/Javadoc2Bean.java 2007-01-04 17:53:29 UTC (rev 1314) @@ -22,57 +22,43 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; -import java.util.Collection; +import java.util.ArrayList; import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.MissingResourceException; import java.util.ResourceBundle; +import java.util.Set; import net.sf.jameleon.exception.JameleonException; import net.sf.jameleon.util.InstanceSerializer; import net.sf.jameleon.util.SupportedTags; -import xjavadoc.SourceClass; -import xjavadoc.XClass; -import xjavadoc.XDoc; -import xjavadoc.XField; -import xjavadoc.XJavaDoc; -import xjavadoc.XMethod; -import xjavadoc.XParameter; -import xjavadoc.XTag; -import xjavadoc.filesystem.FileSourceSet; +import com.thoughtworks.qdox.JavaDocBuilder; +import com.thoughtworks.qdox.model.AbstractJavaEntity; +import com.thoughtworks.qdox.model.DocletTag; +import com.thoughtworks.qdox.model.JavaClass; +import com.thoughtworks.qdox.model.JavaField; +import com.thoughtworks.qdox.model.JavaMethod; +import com.thoughtworks.qdox.model.JavaParameter; public class Javadoc2Bean { protected File sourceDir; protected String isA = "net.sf.jameleon.function.FunctionTag"; - protected XJavaDoc doc; - protected FileSourceSet fileSourceSet; + protected JavaDocBuilder docBuilder; protected Map serializedFiles = new HashMap(); /** * Default constructor only used to initialize variables */ - public Javadoc2Bean() {} - - /** - * Constructor that tells this bean where to get it's source files from - * @param sourceDir - The source directory of where to look for files - */ - public Javadoc2Bean(File sourceDir) { - this.sourceDir = sourceDir; + public Javadoc2Bean() { + docBuilder = new JavaDocBuilder(); + docBuilder.getClassLibrary().addClassLoader(getClass().getClassLoader()); } - /** - * Constructor that tells this bean which XJavaDoc to use - * @param doc - And XJavaDoc object that this instance will use - */ - public Javadoc2Bean(XJavaDoc doc) { - this.doc = doc; - } - public String getClassNameFromTag(String tagName) throws MissingResourceException{ ResourceBundle tags; tags = ResourceBundle.getBundle(SupportedTags.DEFAULT_CUSTOM_TAGS); @@ -124,18 +110,18 @@ } public FunctionalPoint getFunctionalPointWithTag(String tagName) throws FileNotFoundException{ - return getFunctionalPoint(getXClassWithTag(tagName)); + return getFunctionalPoint(getJavaClassWithTag(tagName)); } public FunctionalPoint getFunctionalPointWithClass(String className) throws FileNotFoundException{ - return getFunctionalPoint(getXClassWithClass(className)); + return getFunctionalPoint(getJavaClassWithClass(className)); } public FunctionalPoint getFunctionalPointWithSource(File sourceFile) throws FileNotFoundException{ - return getFunctionalPoint(getXClassWithSource(sourceFile)); + return getFunctionalPoint(getJavaClassWithSource(sourceFile)); } - public FunctionalPoint getFunctionalPoint(XClass clss) throws FileNotFoundException{ + public FunctionalPoint getFunctionalPoint(JavaClass clss){ FunctionalPoint fp = null; if ( clss != null && clss.isA(isA)) { fp = new FunctionalPoint(); @@ -149,8 +135,8 @@ return fp; } - protected FunctionalPoint getFunctionalPointFromSerializedFile(XClass clss){ - String qName = clss.getQualifiedName(); + protected FunctionalPoint getFunctionalPointFromSerializedFile(JavaClass clss){ + String qName = clss.getFullyQualifiedName(); FunctionalPoint fp = null; if (serializedFiles.containsKey(qName)) { fp = (FunctionalPoint)serializedFiles.get(qName); @@ -158,9 +144,8 @@ String fileName = qName.replace('.', '/')+".dat"; InputStream in = getClass().getClassLoader().getResourceAsStream(fileName); if (in != null) { - InstanceSerializer is = new InstanceSerializer(); try { - fp = (FunctionalPoint) is.deserialize(in); + fp = (FunctionalPoint) InstanceSerializer.deserialize(in); serializedFiles.put(qName,fp); } catch (IOException ioe) { //This simply means no accompanying .dat file was found @@ -172,162 +157,184 @@ return fp; } - protected void addDocsFromSerializedFP(FunctionalPoint fp, XClass clss){ + protected void addDocsFromSerializedFP(FunctionalPoint fp, JavaClass clss){ FunctionalPoint serFp = null; - for (XClass superClass = clss; superClass != null && superClass.isA(isA); superClass = superClass.getSuperclass()) { - if (! (superClass instanceof SourceClass)) { - serFp = getFunctionalPointFromSerializedFile(superClass); - if (serFp != null) { - Iterator it = serFp.getAttributes().keySet().iterator(); - String key = null; - while (it.hasNext()) { - key = (String)it.next(); - if ( !fp.getAttributes().containsKey(key) ) { - fp.addAttribute((Attribute)serFp.getAttributes().get(key)); - } + for (JavaClass superClass = clss; superClass != null && superClass.isA(isA); superClass = superClass.getSuperJavaClass()) { + serFp = getFunctionalPointFromSerializedFile(superClass); + if (serFp != null) { + String key = null; + for (Iterator it = serFp.getAttributes().keySet().iterator(); it.hasNext();) { + key = (String)it.next(); + if ( !fp.getAttributes().containsKey(key) ) { + fp.addAttribute((Attribute)serFp.getAttributes().get(key)); } } } } } - protected void addClassDocs(FunctionalPoint fp, XClass clss) { - XDoc xdoc = clss.getDoc(); - fp.setDescription(xdoc.getCommentText()); - fp.setShortDescription(xdoc.getFirstSentence()); - Collection c = xdoc.getTags("jameleon.function"); - Iterator it = c.iterator(); - while (it.hasNext()) { - XTag tag = (XTag)it.next(); - fp.addTagName(convertNullToString(tag.getAttributeValue("name"))); - fp.setType(convertNullToString(tag.getAttributeValue("type"))); + protected void addClassDocs(FunctionalPoint fp, JavaClass clss) { + String comment = clss.getComment(); + fp.setDescription(comment); + fp.setShortDescription(getShortDescription(comment)); + DocletTag[] tagNames = clss.getTagsByName("jameleon.function"); + for (int i = 0; i < tagNames.length; i++) { + fp.addTagName(convertNullToString(tagNames[i].getNamedParameter("name"))); + fp.setType(convertNullToString(tagNames[i].getNamedParameter("type"))); } - XTag tag = xdoc.getTag("author"); + DocletTag tag = clss.getTagByName("author"); if (tag != null) { fp.setAuthor(convertNullToString(tag.getValue())); } } + + protected String getShortDescription(String description){ + String desc = description; + if (desc != null && desc.trim().length() > 0){ + desc = description.replaceAll("(?s)^(.+?)[.\\n\\r]+.*", "$1")+"."; + } + return desc; + } - protected void addApplications(FunctionalPoint fp, XClass clss) { - XDoc xdoc = clss.getDoc(); - Collection c = xdoc.getTags("jameleon.application"); - Iterator it = c.iterator(); - while (it.hasNext()) { - XTag tag = (XTag)it.next(); - fp.addApplication(convertNullToString(tag.getValue())); + protected void addApplications(FunctionalPoint fp, JavaClass clss) { + DocletTag[] applicationTags = clss.getTagsByName("jameleon.application"); + for (int i = 0; i < applicationTags.length; i++) { + fp.addApplication(convertNullToString(applicationTags[i].getValue())); } } - protected void addSteps(FunctionalPoint fp, XClass clss) { - XDoc xdoc = clss.getDoc(); - Collection c = xdoc.getTags("jameleon.step"); - Iterator it = c.iterator(); - while (it.hasNext()) { - XTag tag = (XTag)it.next(); - fp.addStep(convertNullToString(tag.getValue())); + protected void addSteps(FunctionalPoint fp, JavaClass clss) { + DocletTag[] tags = clss.getTagsByName("jameleon.step"); + for (int i = 0; i < tags.length; i++) { + fp.addStep(convertNullToString(tags[i].getValue())); } } - protected void addMethods(FunctionalPoint fp, XClass clss) { + protected void addMethods(FunctionalPoint fp, JavaClass clss) { String name = null; String type = null; - Collection c = clss.getMethods(true); - Iterator it = c.iterator(); + JavaMethod[] methods = clss.getMethods(true); Attribute attr = null; - while (it.hasNext()) { - XMethod method = (XMethod)it.next(); - XDoc d = method.getDoc(); - if (method.isPropertyMutator() && d.hasTag("jameleon.attribute",true)) { - type = getFirstParameterTypeFromXMethod(method); - name = method.getPropertyName(); + for (int i = 0; i < methods.length; i++) { + if (methods[i].isPropertyMutator() && methods[i].getTagByName("jameleon.attribute") != null) { + type = getFirstParameterTypeFromJavaMethod(methods[i]); + name = methods[i].getPropertyName(); if (fp.getAttributes().containsKey(name)) { attr = (Attribute)fp.getAttributes().get(name); - fp.addAttribute(createAttributeFromTag(d, name, attr.getType(), attr.getContextName(), false)); + fp.addAttribute(createAttributeFromTag(methods[i], name, attr.getType(), attr.getContextName(), false)); } else { - fp.addAttribute(createAttributeFromTag(d, name, type, "",false)); + fp.addAttribute(createAttributeFromTag(methods[i], name, type, "",false)); } } } } - protected void addFields(FunctionalPoint fp, XClass clss) { - Collection c = clss.getFields(true); - processAttributes(c, fp); - //Now check for fields defined in the current class. If any of the fields in the superclass are also defined - //in the current class, then overwrite that field and it's attributes with this one. - c = clss.getFields(false); - processAttributes(c, fp); + protected void addFields(FunctionalPoint fp, JavaClass clss) { + JavaField[] fields = getFields(clss); + processAttributes(fields, fp); } - private void processAttributes(Collection fields, FunctionalPoint fp){ + protected JavaField[] getFields(JavaClass clss) { + Set signatures = new HashSet(); + List fields = new ArrayList(); + addFieldsFromSuperclassAndInterfaces(signatures, fields, clss); + return (JavaField[]) fields.toArray(new JavaField[fields.size()]); + } + + protected void addFieldsFromSuperclassAndInterfaces(Set signatures, List fieldList, JavaClass clazz) { + JavaField[] fields = clazz.getFields(); + + addNewFields(signatures, fieldList, fields); + + JavaClass superclass = clazz.getSuperJavaClass(); + + // workaround for a bug in getSuperJavaClass + if ((superclass != null) && (superclass != clazz)) { + addFieldsFromSuperclassAndInterfaces(signatures, fieldList, superclass); + } + + JavaClass[] implementz = clazz.getImplementedInterfaces(); + + for (int i = 0; i < implementz.length; i++) { + if (implementz[i] != null) { + addFieldsFromSuperclassAndInterfaces(signatures, fieldList, implementz[i]); + } + } + } + + private void addNewFields(Set signatures, List fieldList, JavaField[] fields) { + for (int i = 0; i < fields.length; i++) { + String signature = fields[i].getName(); + if (!signatures.contains(signature)) { + fieldList.add(fields[i]); + signatures.add(signature); + } + } + } + + private void processAttributes(JavaField[] attributes, FunctionalPoint fp){ String name = null; String contextName = null; String type = null; - Iterator it = fields.iterator(); - while (it.hasNext()) { - XField field = (XField)it.next(); - XDoc d = field.getDoc(); - if (d.hasTag("jameleon.attribute",true)) { - contextName = d.getTagAttributeValue("jameleon.attribute","contextName",true); - type = field.getType().toString(); - name = field.getName(); - fp.addAttribute(createAttributeFromTag(d, name, type, contextName,true)); + for (int i = 0; i < attributes.length; i++){ + if (attributes[i].getTagByName("jameleon.attribute") != null) { + contextName = attributes[i].getNamedParameter("jameleon.attribute","contextName"); + type = attributes[i].getType().getValue(); + name = attributes[i].getName(); + fp.addAttribute(createAttributeFromTag(attributes[i], name, type, contextName,true)); } } } - protected Attribute createAttributeFromTag(XDoc d, String name, String type, String contextName, boolean instanceVariable) { + protected Attribute createAttributeFromTag(AbstractJavaEntity aje, String name, String type, String contextName, boolean instanceVariable) { Attribute attr = new Attribute(); attr.setName(convertNullToString(name)); attr.setContextName(contextName); attr.setType(convertNullToString(type)); - attr.setDescription(convertNullToString(d.getCommentText())); - attr.setRequired(new Boolean(d.getTagAttributeValue("jameleon.attribute","required",true)).booleanValue()); + attr.setDescription(convertNullToString(aje.getComment())); + attr.setRequired(new Boolean(aje.getNamedParameter("jameleon.attribute","required")).booleanValue()); //This needs to default to null - attr.setDefaultValue(d.getTagAttributeValue("jameleon.attribute","default",true)); + attr.setDefaultValue(aje.getNamedParameter("jameleon.attribute","default")); attr.setInstanceVariable(instanceVariable); return attr; } - protected XJavaDoc setUpSourceSet(){ - if (doc == null) { - doc = new XJavaDoc(); - fileSourceSet = new FileSourceSet(sourceDir); - doc.addSourceSet(fileSourceSet); - doc.getSourceClasses().size(); + public JavaDocBuilder getJavaDocBuilder(){ + return setUpSourceSet(); + } + + protected JavaDocBuilder setUpSourceSet(){ + if (docBuilder == null) { + docBuilder = new JavaDocBuilder(); + docBuilder.getClassLibrary().addClassLoader(getClass().getClassLoader()); + docBuilder.addSourceTree(sourceDir); } - return doc; + return docBuilder; } - protected XClass getXClassWithTag(String tagName) throws FileNotFoundException{ + protected JavaClass getJavaClassWithTag(String tagName) throws FileNotFoundException{ String className = getClassNameFromTag(tagName); - try { - getSourceFile(className); - } catch (MissingResourceException mre) { - throw new FileNotFoundException("File corresponding to "+tagName +" not found"); - } - XJavaDoc d = setUpSourceSet(); - return d.getXClass(className); + return getJavaClass(className, tagName); + } + protected JavaClass getJavaClassWithClass(String className) throws FileNotFoundException{ + return getJavaClass(className, className); } - - protected XClass getXClassWithClass(String className) throws FileNotFoundException{ + + private JavaClass getJavaClass(String className, String resource) throws FileNotFoundException{ try { getSourceFile(className); } catch (MissingResourceException mre) { - throw new FileNotFoundException("File corresponding to "+className +" not found"); + throw new FileNotFoundException("File corresponding to "+resource +" not found"); } - XJavaDoc d = setUpSourceSet(); - return d.getXClass(className); - + return getJavaDocBuilder().getClassByName(className); } - protected XClass getXClassWithSource(File sourceFile) throws FileNotFoundException{ + protected JavaClass getJavaClassWithSource(File sourceFile) throws FileNotFoundException{ if (!sourceFile.exists()) { throw new FileNotFoundException("File \""+sourceFile.getPath() +"\" not found"); } - XJavaDoc d = setUpSourceSet(); - return d.getXClass(getClassNameFromSource(sourceFile.getPath())); + return getJavaDocBuilder().getClassByName(getClassNameFromSource(sourceFile.getPath())); } protected String convertNullToString(String str){ @@ -343,12 +350,12 @@ * But on method params, XJavadoc gets the fully qualified name * Since we use both, we want to make it consistent */ - protected String getFirstParameterTypeFromXMethod(XMethod method) { + protected String getFirstParameterTypeFromJavaMethod(JavaMethod method) { String type = ""; - List params = method.getParameters(); - if (params.size() > 0) { - XParameter param = (XParameter)params.get(0); - type = param.toString(); + JavaParameter[] params = method.getParameters(); + if (params.length > 0) { + JavaParameter param = params[0]; + type = param.getType().getValue(); int index = type.indexOf(" "); if (index > -1) { type = type.substring(0, index); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/ui/FunctionalPointTree.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/ui/FunctionalPointTree.java 2007-01-04 17:52:12 UTC (rev 1313) +++ trunk/jameleon-core/src/java/net/sf/jameleon/ui/FunctionalPointTree.java 2007-01-04 17:53:29 UTC (rev 1314) @@ -148,10 +148,9 @@ pNode = node; className = className.substring(index+1); } - InstanceSerializer ser = new InstanceSerializer(); String fileName = qName.replace('.', '/')+InstanceSerializer.SERIALIZED_EXT; try { - FunctionalPoint fp = (FunctionalPoint)ser.deserialize(cl.getResourceAsStream(fileName)); + FunctionalPoint fp = (FunctionalPoint)InstanceSerializer.deserialize(cl.getResourceAsStream(fileName)); node = new DefaultMutableTreeNode(fp, false); if ( pNode.getIndex(node) == -1 ) { pNode.add(node); Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/ant/JameleonXDocletTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/ant/JameleonXDocletTest.java 2007-01-04 17:52:12 UTC (rev 1313) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/ant/JameleonXDocletTest.java 2007-01-04 17:53:29 UTC (rev 1314) @@ -34,9 +34,8 @@ import org.apache.tools.ant.BuildException; -import xjavadoc.XClass; -import xjavadoc.XJavaDoc; -import xjavadoc.filesystem.FileSourceSet; +import com.thoughtworks.qdox.JavaDocBuilder; +import com.thoughtworks.qdox.model.JavaClass; public class JameleonXDocletTest extends TestCase { @@ -50,7 +49,7 @@ private static final String INVALID_TYPE_TAG = "DummyTagInvalidType"; private static final String TMP_FILE_NAME = "tst/_tmp/tagDefs.props"; - protected XJavaDoc doc; + protected JavaDocBuilder docBuilder; protected JameleonXDoclet jxdoc; protected Javadoc2Bean j2b; protected Properties props; @@ -58,29 +57,31 @@ public JameleonXDocletTest( String name ) { super( name ); } - + //JUnit Methods public static void main(String args[]) { junit.textui.TestRunner.run( suite() ); } - + public static Test suite() { return new TestSuite( JameleonXDocletTest.class ); } + public void testTest(){ + assertTrue(true); + } public void setUp(){ File dir = new File(JameleonUtility.fixFileSeparators(TST_DIR)); - doc = new XJavaDoc(); - j2b = new Javadoc2Bean(doc); - doc.addSourceSet(new FileSourceSet(dir)); - doc.getSourceClasses().size(); + j2b = new Javadoc2Bean(); + docBuilder = j2b.getJavaDocBuilder(); + docBuilder.addSourceTree(dir); jxdoc = new JameleonXDoclet(); jxdoc.setOutputDir(new File("tst/_tmp")); props = new Properties(); } public void tearDown(){ - doc = null; + docBuilder = null; jxdoc = null; props = null; j2b = null; @@ -90,7 +91,7 @@ public void testSetClassAttributes(){ File serializedFile = null; try{ - XClass clss = doc.getXClass(FULL_TAG); + JavaClass clss = docBuilder.getClassByName(TST_PKG+FULL_TAG); jxdoc.setOutputDir(new File("tst/java")); serializedFile = new File(TST_DIR+FULL_TAG+InstanceSerializer.SERIALIZED_EXT); serializedFile.delete(); @@ -104,16 +105,19 @@ } public void testSetClassAttributesDuplicateTagName() { - XClass clss = doc.getXClass(ONE_TAG); + JavaClass clss = docBuilder.getClassByName(TST_PKG+ONE_TAG); jxdoc.setClassAttributes(clss, props, j2b); + Exception e = null; try{ jxdoc.setClassAttributes(clss, props, j2b); - fail("A build exception should have been thrown"); - }catch(BuildException be){} + }catch(BuildException be){ + e = be; + } + assertNotNull("An exception should have occured.", e); } public void testRegisterMultipleNamesSameFunction() { - XClass clss = doc.getXClass(TWO_TAGS); + JavaClass clss = docBuilder.getClassByName(TST_PKG+TWO_TAGS); jxdoc.setClassAttributes(clss, props, j2b); assertEquals("Number of function points registered", 2, props.size()); assertContains("Registered tag", TWO_TAGS, props.getProperty("two-tag-name1")); @@ -165,7 +169,7 @@ } public void testSetClassAttributesInvalidType() { - XClass clss = doc.getXClass(TST_PKG+INVALID_TYPE_TAG); + JavaClass clss = docBuilder.getClassByName(TST_PKG+INVALID_TYPE_TAG); boolean exceptionThrown = false; try{ jxdoc.setClassAttributes(clss,props,j2b); @@ -182,7 +186,7 @@ ByteArrayOutputStream testStdout = new ByteArrayOutputStream(); System.setOut(new PrintStream(testStdout)); try { - XClass clss = doc.getXClass(TST_PKG+className); + JavaClass clss = docBuilder.getClassByName(TST_PKG+className); jxdoc.setClassAttributes(clss, props, j2b); assertContains("Expected a warning message containing", warning, testStdout.toString()); } finally { Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Javadoc2BeanTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Javadoc2BeanTest.java 2007-01-04 17:52:12 UTC (rev 1313) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Javadoc2BeanTest.java 2007-01-04 17:53:29 UTC (rev 1314) @@ -24,17 +24,14 @@ import junit.framework.TestCase; import junit.framework.TestSuite; -import xjavadoc.XClass; -import xjavadoc.XJavaDoc; -import xjavadoc.filesystem.FileSourceSet; - import java.io.File; import java.io.FileNotFoundException; import java.util.MissingResourceException; +import com.thoughtworks.qdox.model.JavaClass; + public class Javadoc2BeanTest extends TestCase{ - private Javadoc2Bean j2b; private static final String FP_TAG_NAME = "javadoc2bean-dummy1"; private static final String FP_CLASS_NAME = "net.sf.jameleon.bean.Dummy1"; @@ -61,17 +58,18 @@ public static Test suite() { return new TestSuite( Javadoc2BeanTest.class ); } + + public void testTest(){ + assertTrue(true); + } public void setUp(){ File dir = new File(JameleonUtility.fixFileSeparators(TST_DIR+"/net/sf/jameleon/bean")); - XJavaDoc doc = new XJavaDoc(); - j2b = new Javadoc2Bean(doc); + j2b = new Javadoc2Bean(); j2b.setIsA("net.sf.jameleon.JameleonTagSupport"); - j2b.fileSourceSet = new FileSourceSet(dir); - doc.addSourceSet(j2b.fileSourceSet); + j2b.getJavaDocBuilder().addSourceTree(dir); dir = new File(JameleonUtility.fixFileSeparators(TST_DIR+"/net/sf/jameleon/function")); - doc.addSourceSet(new FileSourceSet(dir)); - doc.getSourceClasses().size(); + j2b.getJavaDocBuilder().addSourceTree(dir); tstTagFile = new File(TST_DIR); j2b.setSourceDir(tstTagFile); } @@ -82,6 +80,28 @@ } //End JUnit Methods + public void testGetShortDescription(){ + String desc = null; + assertNull("short description", j2b.getShortDescription(desc)); + desc = ""; + assertEquals("short description", "", j2b.getShortDescription(desc)); + + desc = "First sentence. with a period in it. actually three periods in it."; + assertEquals("short description", "First sentence.", j2b.getShortDescription(desc)); + desc = "First sentence with out a new line or a period in it"; + assertEquals("short description", "First sentence with out a new line or a period in it.", j2b.getShortDescription(desc)); + desc = "First sentence with out a period in it\r\nFollowed by another line"; + assertEquals("short description", "First sentence with out a period in it.", j2b.getShortDescription(desc)); + desc = "First sentence with out a period in it\n\rFollowed by another line"; + assertEquals("short description", "First sentence with out a period in it.", j2b.getShortDescription(desc)); + desc = "First sentence with out a period in it\rFollowed by another line"; + assertEquals("short description", "First sentence with out a period in it.", j2b.getShortDescription(desc)); + desc = "First sentence with out a period in it\nFollowed by another line"; + assertEquals("short description", "First sentence with out a period in it.", j2b.getShortDescription(desc)); + desc = "First sentence with a period in it.\nFollowed by another line.\n and another line\nand yet another"; + assertEquals("short description", "First sentence with a period in it.", j2b.getShortDescription(desc)); + } + public String testGetClassNameFromTag(){ String className = null; try{ @@ -93,15 +113,6 @@ return className; } - public void testConstructorWithXDoc(){ - XJavaDoc doc1 = new XJavaDoc(); - XJavaDoc doc2 = new XJavaDoc(); - - j2b = new Javadoc2Bean(doc1); - assertTrue("Same XJavadoc reference", doc1 == j2b.doc); - assertTrue("Different XJavadoc reference", doc2 != j2b.doc); - } - public void testGetFileFromClassName(){ String className = testGetClassNameFromTag(); assertNotNull("Class Name", className); @@ -159,7 +170,7 @@ assertNotNull("Functional Point Bean shouldn't be null", fp); assertEquals("FP Author", "Christian Hargraves", fp.getAuthor()); assertEquals("FP tag name", FP_TAG_NAME, fp.getDefaultTagName()); - assertEquals("FP description", "Tests Javadoc2Bean. Some more text", fp.getDescription()); + assertEquals("FP description", "Tests Javadoc2Bean.\nSome more text", fp.getDescription()); assertEquals("FP short description", "Tests Javadoc2Bean.", fp.getShortDescription()); assertEquals("FP Type", "action", fp.getType()); //MockFunctionTag is not in the source path @@ -192,7 +203,7 @@ } public void testAddClassDocs() throws FileNotFoundException { - XClass clss = j2b.getXClassWithClass(DUMMY2_CLASS); + JavaClass clss = j2b.getJavaClassWithClass(DUMMY2_CLASS); FunctionalPoint fp = new FunctionalPoint(); j2b.addClassDocs(fp, clss); assertEquals("FP Author", "ABC", fp.getAuthor()); @@ -202,7 +213,7 @@ } public void testAddSteps() throws FileNotFoundException { - XClass clss = j2b.getXClassWithClass(DUMMY2_CLASS); + JavaClass clss = j2b.getJavaClassWithClass(DUMMY2_CLASS); FunctionalPoint fp = new FunctionalPoint(); j2b.addSteps(fp, clss); assertEquals("Number of FP Steps", 3, fp.getSteps().size()); @@ -212,7 +223,7 @@ } public void testAddMethodsNoAddFields() throws FileNotFoundException { - XClass clss = j2b.getXClassWithClass(DUMMY2_CLASS); + JavaClass clss = j2b.getJavaClassWithClass(DUMMY2_CLASS); FunctionalPoint fp = new FunctionalPoint(); j2b.addMethods(fp, clss); assertEquals("Number of FP Attributes", 1, fp.getAttributes().size()); @@ -225,7 +236,7 @@ } public void testAddMethodsAddFields() throws FileNotFoundException { - XClass clss = j2b.getXClassWithClass(DUMMY3_CLASS); + JavaClass clss = j2b.getJavaClassWithClass(DUMMY3_CLASS); FunctionalPoint fp = new FunctionalPoint(); j2b.addFields(fp, clss); j2b.addMethods(fp, clss); @@ -241,7 +252,7 @@ } public void testAddFields() throws FileNotFoundException { - XClass clss = j2b.getXClassWithClass(DUMMY2_CLASS); + JavaClass clss = j2b.getJavaClassWithClass(DUMMY2_CLASS); FunctionalPoint fp = new FunctionalPoint(); j2b.addFields(fp, clss); assertEquals("Number of FP Attributes", 2, fp.getAttributes().size()); @@ -261,7 +272,7 @@ } public void testInheritance() throws FileNotFoundException{ - XClass clss = j2b.getXClassWithClass(DUMMY2_SUB_CLASS); + JavaClass clss = j2b.getJavaClassWithClass(DUMMY2_SUB_CLASS); FunctionalPoint fp = new FunctionalPoint(); j2b.addClassDocs(fp, clss); assertEquals("FP Author", "CBS", fp.getAuthor()); @@ -284,9 +295,9 @@ assertEquals("FP Attribute Type #1","java.lang.String", attr.getType()); attr = (Attribute)fp.getAttributes().get("brain"); - assertEquals("FP Attribute Name #1", "ifIOnlyHadA" , attr.getContextName()); - assertEquals("FP Attribute Name #1", "brain" , attr.getName()); - assertEquals("FP Attribute Description #1", "Joe's brain", attr.getDescription()); + assertEquals("FP Attribute Name #2", "ifIOnlyHadA" , attr.getContextName()); + assertEquals("FP Attribute Name #2", "brain" , attr.getName()); + assertEquals("FP Attribute Description #2", "Joe's brain", attr.getDescription()); assertFalse("FP Attribute should NOT be required", attr.isRequired()); assertEquals("FP Attribute Type #1","java.lang.String", attr.getType()); @@ -302,7 +313,7 @@ } public void testMultipleTagNames() throws FileNotFoundException { - XClass clss = j2b.getXClassWithClass(DUMMY2_SUB_CLASS); + JavaClass clss = j2b.getJavaClassWithClass(DUMMY2_SUB_CLASS); FunctionalPoint fp = new FunctionalPoint(); j2b.addClassDocs(fp, clss); assertEquals("Number of FP tags", 2, fp.getTagNames().size()); @@ -313,14 +324,14 @@ public void testGetFunctionalPointFromSerializedFile() throws FileNotFoundException{ //This must be a file that doesn't exist in the source directory, yet //it has been serialized. - XClass clss = j2b.getXClassWithClass("net.sf.jameleon.plugin.junit.SimpleFunction"); + JavaClass clss = j2b.getJavaClassWithClass("net.sf.jameleon.plugin.junit.SimpleFunction"); FunctionalPoint fp = j2b.getFunctionalPointFromSerializedFile(clss); assertNotNull("Every Functional Point should have a functionId",fp.getAttribute("functionId")); assertEquals("# of cached serialized FunctionalPoints", 1, j2b.serializedFiles.size()); } public void testAddDocsFromSerializedFP() throws FileNotFoundException{ - XClass clss = j2b.getXClassWithClass("net.sf.jameleon.plugin.junit.SimpleFunction"); + JavaClass clss = j2b.getJavaClassWithClass("net.sf.jameleon.plugin.junit.SimpleFunction"); FunctionalPoint fp = new FunctionalPoint(); j2b.addFields(fp, clss); j2b.addDocsFromSerializedFP(fp, clss); @@ -328,13 +339,13 @@ } public void testInheritanceNoSource() throws FileNotFoundException{ - XClass clss = j2b.getXClassWithClass("net.sf.jameleon.plugin.junit.SimpleFunctionWithTwoVars"); + JavaClass clss = j2b.getJavaClassWithClass("net.sf.jameleon.plugin.junit.SimpleFunctionWithTwoVars"); FunctionalPoint fp = j2b.getFunctionalPoint(clss); assertNotNull("Every Functional Point should have a functionId",fp.getAttribute("functionId")); } public void testAddApplicationsSingleApplication() throws FileNotFoundException{ - XClass clss = j2b.getXClassWithClass(DUMMY_WITH_APPLICATION); + JavaClass clss = j2b.getJavaClassWithClass(DUMMY_WITH_APPLICATION); FunctionalPoint fp = new FunctionalPoint(); j2b.addApplications(fp, clss); assertEquals("# of applications", 1, fp.getApplications().size()); @@ -342,7 +353,7 @@ } public void testAddApplicationsMultipleApplications() throws FileNotFoundException{ - XClass clss = j2b.getXClassWithClass(DUMMY_WITH_APPLICATIONS); + JavaClass clss = j2b.getJavaClassWithClass(DUMMY_WITH_APPLICATIONS); FunctionalPoint fp = new FunctionalPoint(); j2b.addApplications(fp, clss); assertEquals("# of applications", 3, fp.getApplications().size()); @@ -350,6 +361,6 @@ assertEquals("application name", "bar_app", fp.getApplications().get(1)); assertEquals("application name", "foo_bar_app", fp.getApplications().get(2)); } - + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2007-01-04 20:43:54
|
Revision: 1315 http://svn.sourceforge.net/jameleon/?rev=1315&view=rev Author: engrean Date: 2007-01-04 12:43:53 -0800 (Thu, 04 Jan 2007) Log Message: ----------- Fixed Bug #1628151 - TestCase can have the same test level multiple times Modified Paths: -------------- trunk/jameleon-core/src/java/net/sf/jameleon/bean/TestCase.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/TestCaseTest.java Modified: trunk/jameleon-core/src/java/net/sf/jameleon/bean/TestCase.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/bean/TestCase.java 2007-01-04 17:53:29 UTC (rev 1314) +++ trunk/jameleon-core/src/java/net/sf/jameleon/bean/TestCase.java 2007-01-04 20:43:53 UTC (rev 1315) @@ -119,7 +119,9 @@ } public void addTestLevel(String testLevel){ - testLevels.add(testLevel); + if (testLevels != null && !testLevels.contains(testLevel)){ + testLevels.add(testLevel); + } } public String getApplication(){ Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/bean/TestCaseTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/bean/TestCaseTest.java 2007-01-04 17:53:29 UTC (rev 1314) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/bean/TestCaseTest.java 2007-01-04 20:43:53 UTC (rev 1315) @@ -94,6 +94,12 @@ testCase = null; } + public void testAddTestCaseLevel(){ + assertEquals("# of test case levels", 2, testCase.getTestLevels().size()); + testCase.addTestLevel(TEST_LEVEL1); + assertEquals("# of test case levels", 2, testCase.getTestLevels().size()); + } + public void testReadFromScriptAllValuesSet(){ testCase = new net.sf.jameleon.bean.TestCase(); String testEnv = "lala"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2007-01-04 21:28:16
|
Revision: 1320 http://svn.sourceforge.net/jameleon/?rev=1320&view=rev Author: engrean Date: 2007-01-04 13:28:15 -0800 (Thu, 04 Jan 2007) Log Message: ----------- Feature Request #1628193 - Switch jameleon-core to use the syntax generator Modified Paths: -------------- trunk/jameleon-core/build.properties trunk/jameleon-core/res/syntaxReference.txt Removed Paths: ------------- trunk/jameleon-core/xdocs/syntax-reference.fml Modified: trunk/jameleon-core/build.properties =================================================================== --- trunk/jameleon-core/build.properties 2007-01-04 21:24:52 UTC (rev 1319) +++ trunk/jameleon-core/build.properties 2007-01-04 21:28:15 UTC (rev 1320) @@ -1,4 +1,5 @@ build.compiler=modern +pluginName=Jameleon Core build.dir=Build dist.dir=Dist lib.dir=lib @@ -7,3 +8,4 @@ version=3.3-M4 test.suite.version=3.3-M4 start.date=11 November 2006 +genSyntaxRef=true Modified: trunk/jameleon-core/res/syntaxReference.txt =================================================================== --- trunk/jameleon-core/res/syntaxReference.txt 2007-01-04 21:24:52 UTC (rev 1319) +++ trunk/jameleon-core/res/syntaxReference.txt 2007-01-04 21:28:15 UTC (rev 1320) @@ -9,7 +9,7 @@ <link href="default.css" rel="stylesheet" type="text/css"/> <body> - <section name="$pluginName Plug-in Tags"> + <section name="$pluginName Tags"> <p> <table> <tr> Deleted: trunk/jameleon-core/xdocs/syntax-reference.fml =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2007-01-05 00:22:28
|
Revision: 1328 http://svn.sourceforge.net/jameleon/?rev=1328&view=rev Author: engrean Date: 2007-01-04 16:22:27 -0800 (Thu, 04 Jan 2007) Log Message: ----------- cleaned up maven requirements Modified Paths: -------------- trunk/jameleon-core/project.properties trunk/jameleon-core/project.xml Modified: trunk/jameleon-core/project.properties =================================================================== --- trunk/jameleon-core/project.properties 2007-01-05 00:14:41 UTC (rev 1327) +++ trunk/jameleon-core/project.properties 2007-01-05 00:22:27 UTC (rev 1328) @@ -12,17 +12,8 @@ # ------------------------------------------------------------------------ # Jars set explicity by path. # ------------------------------------------------------------------------ -maven.jar.commons-jelly = ${lib.dir}/commons-jelly-1.0.jar -maven.jar.ant = ${lib.dir}/ant/ant.jar maven.jar.ant-launcher = ${lib.dir}/ant/ant-launcher.jar -maven.jar.commons-beanutils = ${lib.dir}/commons-beanutils-1.7.0.jar -maven.jar.commons-collections = ${lib.dir}/commons-collections-3.2.jar -maven.jar.dom4j = ${lib.dir}/dom4j-1.6.1.jar maven.jar.jdic = ${lib.dir}/jdic.jar -maven.jar.junit = ${lib.dir}/junit.jar -maven.jar.log4j = ${lib.dir}/log4j-1.2.14.jar -maven.jar.qdox = ${lib.dir}/qdox-1.6.1.jar -maven.jar.velocity = ${lib.dir}/velocity-1.4.jar maven.changes.issue.template = http://sourceforge.net/support/tracker.php?aid=%ISSUE% maven.checkstyle.header.file = xdocs/jameleon-core-header.txt Modified: trunk/jameleon-core/project.xml =================================================================== --- trunk/jameleon-core/project.xml 2007-01-05 00:14:41 UTC (rev 1327) +++ trunk/jameleon-core/project.xml 2007-01-05 00:22:27 UTC (rev 1328) @@ -140,10 +140,12 @@ <dependency> <groupId>ant</groupId> <artifactId>ant</artifactId> + <version>1.6.5</version> </dependency> <dependency> <groupId>ant-launcher</groupId> <artifactId>ant-launcher</artifactId> + <version>1.6.5</version> </dependency> <dependency> <groupId>tools</groupId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2007-01-18 20:01:28
|
Revision: 1348 http://svn.sourceforge.net/jameleon/?rev=1348&view=rev Author: engrean Date: 2007-01-18 12:01:26 -0800 (Thu, 18 Jan 2007) Log Message: ----------- added build for watij plug-in Modified Paths: -------------- trunk/jameleon-core/build.xml trunk/jameleon-core/src/test-suite/jameleon.conf Modified: trunk/jameleon-core/build.xml =================================================================== --- trunk/jameleon-core/build.xml 2007-01-18 19:48:43 UTC (rev 1347) +++ trunk/jameleon-core/build.xml 2007-01-18 20:01:26 UTC (rev 1348) @@ -117,8 +117,14 @@ </antcall> </target> - <target name="build.plugins" depends="build.htmlunit, build.httpunit, build.jagacy, build.jiffie, build.jwebunit, build.selenium"/> + <target name="build.watij" description="builds the watij-plugin"> + <antcall target="build.plugin"> + <param name="plugin" value="watij-plugin"/> + </antcall> + </target> + <target name="build.plugins" depends="build.htmlunit, build.httpunit, build.jagacy, build.jiffie, build.jwebunit, build.selenium, build.watij"/> + <target name="clean.htmlunit" description="cleans the htmlunit-plugin"> <ant antfile="../htmlunit-plugin/build.xml" target="clean" inheritAll="false"/> </target> @@ -139,12 +145,16 @@ <ant antfile="../jwebunit-plugin/build.xml" target="clean" inheritAll="false"/> </target> - <target name="clean.selenium" description="cleans the jwebunit-plugin"> + <target name="clean.selenium" description="cleans the selenium-plugin"> <ant antfile="../selenium-plugin/build.xml" target="clean" inheritAll="false"/> </target> - <target name="clean.plugins" depends="clean.htmlunit, clean.httpunit, clean.jagacy, clean.jiffie, clean.jwebunit, clean.selenium"/> + <target name="clean.watij" description="cleans the watij-plugin"> + <ant antfile="../watij-plugin/build.xml" target="clean" inheritAll="false"/> + </target> + <target name="clean.plugins" depends="clean.htmlunit, clean.httpunit, clean.jagacy, clean.jiffie, clean.jwebunit, clean.selenium, clean.watij"/> + <target name="maven.site" depends="package.test-suite" description="builds site docs"> <exec dir="." executable="maven.bat"> <arg line="site"/> @@ -167,6 +177,9 @@ <exec dir="../selenium-plugin" executable="maven.bat"> <arg line="site"/> </exec> + <exec dir="../watij-plugin" executable="maven.bat"> + <arg line="site"/> + </exec> </target> <target name="package.htdocs" depends="maven.site" description="creates a src release"> @@ -179,6 +192,7 @@ <zipfileset dir="../jiffie-plugin/${docs}" prefix="htdocs/jiffie-plugin"/> <zipfileset dir="../jwebunit-plugin/${docs}" prefix="htdocs/jwebunit-plugin"/> <zipfileset dir="../selenium-plugin/${docs}" prefix="htdocs/selenium-plugin"/> + <zipfileset dir="../watij-plugin/${docs}" prefix="htdocs/watij-plugin"/> </zip> </target> @@ -240,6 +254,15 @@ <zipfileset dir="../selenium-plugin/lib" prefix="jameleon-test-suite/lib"> <include name="*.jar"/> </zipfileset> + <zipfileset dir="../watij-plugin/${dist.dir}" prefix="jameleon-test-suite/lib"> + <include name="watij-plugin.jar"/> + </zipfileset> + <zipfileset dir="../watij-plugin/lib" prefix="jameleon-test-suite/lib"> + <include name="*.jar"/> + </zipfileset> + <zipfileset dir="../watij-plugin/lib" prefix="jameleon-test-suite/lib" filemode="755"> + <include name="*.dll"/> + </zipfileset> <zipfileset dir="src/test-suite" prefix="jameleon-test-suite"> <include name="build.xml"/> <include name="upgrade.xml"/> Modified: trunk/jameleon-core/src/test-suite/jameleon.conf =================================================================== --- trunk/jameleon-core/src/test-suite/jameleon.conf 2007-01-18 19:48:43 UTC (rev 1347) +++ trunk/jameleon-core/src/test-suite/jameleon.conf 2007-01-18 20:01:26 UTC (rev 1348) @@ -2,7 +2,7 @@ trace=true jiffie-plugin.visible=true jagacy-plugin.visible=true -plugins=jiffie-plugin httpunit-plugin jagacy-plugin jwebunit-plugin htmlunit-plugin selenium-plugin +plugins=jiffie-plugin httpunit-plugin jagacy-plugin jwebunit-plugin htmlunit-plugin selenium-plugin watij-plugin #functionDelay=200 #organization=sourceforge This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2007-01-26 03:24:31
|
Revision: 1396 http://svn.sourceforge.net/jameleon/?rev=1396&view=rev Author: engrean Date: 2007-01-25 19:24:30 -0800 (Thu, 25 Jan 2007) Log Message: ----------- Refactored FunctionalPoint to include the className of the tag. Modified Paths: -------------- trunk/jameleon-core/res/syntaxReference.txt trunk/jameleon-core/src/java/net/sf/jameleon/bean/FunctionalPoint.java trunk/jameleon-core/src/java/net/sf/jameleon/bean/Javadoc2Bean.java trunk/jameleon-core/src/java/net/sf/jameleon/util/GenSyntaxReference.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/FunctionalPointTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Javadoc2BeanTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/util/GenSyntaxReferenceTest.java Modified: trunk/jameleon-core/res/syntaxReference.txt =================================================================== --- trunk/jameleon-core/res/syntaxReference.txt 2007-01-26 01:48:59 UTC (rev 1395) +++ trunk/jameleon-core/res/syntaxReference.txt 2007-01-26 03:24:30 UTC (rev 1396) @@ -24,15 +24,14 @@ #end </table> </p> - #foreach ( $fp_key in $tags.keySet() ) - #set ($fp = $tags.get($fp_key)) + #foreach ( $fp in $tags ) <subsection name="$fp.defaultTagName"> <p> <a name="$fp.defaultTagName">$fp.description</a> </p> <p> #set ($html = ".html") - #set ($path = "$fp_key.replace('.', '/')$html") + #set ($path = "$fp.getClassName().replace('.', '/')$html") Take a look at this tag's <a href="apidocs/$path">API docs</a> and <a href="xref/$path">source code</a> for more information.<br/> </p> Modified: trunk/jameleon-core/src/java/net/sf/jameleon/bean/FunctionalPoint.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/bean/FunctionalPoint.java 2007-01-26 01:48:59 UTC (rev 1395) +++ trunk/jameleon-core/src/java/net/sf/jameleon/bean/FunctionalPoint.java 2007-01-26 03:24:30 UTC (rev 1396) @@ -40,6 +40,10 @@ */ protected LinkedList applications; /** + * The name of the class that this tag represents. + */ + protected String className; + /** * The tags to be used in the test case macro language */ protected LinkedList tagNames; @@ -81,6 +85,7 @@ attributes = new LinkedHashMap(); steps = new LinkedList(); applications = new LinkedList(); + className = new String(); } /** @@ -144,7 +149,7 @@ * @return The name of the developer that wrote this <code>FunctionalPoint</code> */ public String getAuthor(){ - return this.author; + return author; } /** @@ -156,6 +161,21 @@ } /** + * @return The name of the class that represents this <code>FunctionalPoint</code> + */ + public String getClassName(){ + return className; + } + + /** + * Sets the name of the class that represents this <code>FunctionalPoint</code> + * @param className - the name of the class that represents this <code>FunctionalPoint</code> + */ + public void setClassName(String className){ + this.className = className; + } + + /** * @return The default tag name to be used in the test case macro language */ public String getDefaultTagName(){ @@ -184,7 +204,7 @@ * @return A short summary about how this functional can be used */ public String getDescription(){ - return this.description; + return description; } /** @@ -200,7 +220,7 @@ * @return The first line of the javadoc class comments. */ public String getShortDescription(){ - return this.shortDescription; + return shortDescription; } /** @@ -215,7 +235,7 @@ * @return A short summary about how this functional point is used */ public String getFunctionId(){ - return this.functionId; + return functionId; } /** @@ -254,7 +274,7 @@ * @return A list of attributes that this functional point uses */ public Map getAttributes(){ - return this.attributes; + return attributes; } /** @@ -269,7 +289,7 @@ * @return A list of steps that this FunctionalPoint uses during execution */ public LinkedList getSteps(){ - return this.steps; + return steps; } /** Modified: trunk/jameleon-core/src/java/net/sf/jameleon/bean/Javadoc2Bean.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/bean/Javadoc2Bean.java 2007-01-26 01:48:59 UTC (rev 1395) +++ trunk/jameleon-core/src/java/net/sf/jameleon/bean/Javadoc2Bean.java 2007-01-26 03:24:30 UTC (rev 1396) @@ -125,6 +125,7 @@ FunctionalPoint fp = null; if ( clss != null && clss.isA(isA)) { fp = new FunctionalPoint(); + fp.setClassName(clss.getFullyQualifiedName()); addClassDocs(fp, clss); addApplications(fp, clss); addSteps(fp, clss); Modified: trunk/jameleon-core/src/java/net/sf/jameleon/util/GenSyntaxReference.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/util/GenSyntaxReference.java 2007-01-26 01:48:59 UTC (rev 1395) +++ trunk/jameleon-core/src/java/net/sf/jameleon/util/GenSyntaxReference.java 2007-01-26 03:24:30 UTC (rev 1396) @@ -48,7 +48,7 @@ key = (String)it.next(); className = (String)supportedTagsMap.get(key); fp = JameleonUtility.loadFunctionalPoint(className, this); - tags.put(className, fp); + tags.put(fp.getDefaultTagName(), fp); } return tags; } Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/bean/FunctionalPointTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/bean/FunctionalPointTest.java 2007-01-26 01:48:59 UTC (rev 1395) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/bean/FunctionalPointTest.java 2007-01-26 03:24:30 UTC (rev 1396) @@ -33,6 +33,7 @@ private FunctionalPoint fp = null; private FunctionalPoint fp2 = null; private static final String TAG_NAME = "fp-test"; + private static final String CLASS_NAME = "net.sf.jameleon.SomeTag"; private static final String AUTHOR = "Christian"; private static final String DESC = "Does nothing"; private static final String VALID_TYPE = "action"; @@ -70,6 +71,12 @@ fp2 = null; } + public void testSetGetClassName(){ + assertEquals("ClassName", "", fp2.getClassName()); + fp2.setClassName(CLASS_NAME); + assertEquals("ClassName", CLASS_NAME, fp2.getClassName()); + } + //End JUnit Methods public void testFunctionalPointConstructorDefault(){ fp = new FunctionalPoint(); @@ -80,6 +87,7 @@ assertEquals("Steps should be LinkList with no elements", 0, fp.getSteps().size()); assertEquals("Attributes should be LinkList with no elements", 0, fp.getAttributes().size()); assertNotNull("Type should be an empty non-null String!", fp.getType()); + assertNotNull("ClassName should be an empty non-null String!", fp.getClassName()); } public void testSetShortDescription(){ Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Javadoc2BeanTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Javadoc2BeanTest.java 2007-01-26 01:48:59 UTC (rev 1395) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/bean/Javadoc2BeanTest.java 2007-01-26 03:24:30 UTC (rev 1396) @@ -172,6 +172,7 @@ assertEquals("FP tag name", FP_TAG_NAME, fp.getDefaultTagName()); assertEquals("FP description", "Tests Javadoc2Bean.\nSome more text", fp.getDescription()); assertEquals("FP short description", "Tests Javadoc2Bean.", fp.getShortDescription()); + assertEquals("FP className", FP_CLASS_NAME, fp.getClassName()); assertEquals("FP Type", "action", fp.getType()); //MockFunctionTag is not in the source path assertTrue("Number of FP Attributes should be greate than 3", fp.getAttributes().size() > 3); Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/util/GenSyntaxReferenceTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/util/GenSyntaxReferenceTest.java 2007-01-26 01:48:59 UTC (rev 1395) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/util/GenSyntaxReferenceTest.java 2007-01-26 03:24:30 UTC (rev 1396) @@ -1,6 +1,6 @@ /* Jameleon - An automation testing tool.. - Copyright (C) 2006 Christian W. Hargraves (en...@ho...) + Copyright (C) 2007 Christian W. Hargraves (en...@ho...) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2007-02-06 22:11:18
|
Revision: 1419 http://svn.sourceforge.net/jameleon/?rev=1419&view=rev Author: engrean Date: 2007-02-06 14:11:15 -0800 (Tue, 06 Feb 2007) Log Message: ----------- Changing from hsqldb to h2 database Modified Paths: -------------- trunk/jameleon-core/tst/java/net/sf/jameleon/data/SqlDataDriverTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/data/SqlTagTest.java trunk/jameleon-core/tst/res/test-Applications.properties trunk/jameleon-core/tst/xml/acceptance/fineGrainedTests.xml trunk/jameleon-core/tst/xml/framework/dataDrivableMapVariable.xml trunk/jameleon-core/tst/xml/framework/max_execution_time_exceeded.xml trunk/jameleon-core/tst/xml/framework/sqlTagCountRowFalse.xml trunk/jameleon-core/tst/xml/framework/sqlTagCountRowTrue.xml trunk/jameleon-core/tst/xml/framework/sql_update_tag_success.xml Added Paths: ----------- trunk/jameleon-core/lib/h2.jar Added: trunk/jameleon-core/lib/h2.jar =================================================================== (Binary files differ) Property changes on: trunk/jameleon-core/lib/h2.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/data/SqlDataDriverTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/data/SqlDataDriverTest.java 2007-02-06 22:10:11 UTC (rev 1418) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/data/SqlDataDriverTest.java 2007-02-06 22:11:15 UTC (rev 1419) @@ -33,8 +33,8 @@ protected DataExecuter dd; protected SqlDataDriver sqlD2; protected SqlDataDriver sqlD; - protected final static String DRIVER = "org.hsqldb.jdbcDriver"; - protected final static String URL = "jdbc:hsqldb:tst/_tmp/jameleon_test"; + protected final static String DRIVER = "org.h2.Driver"; + protected final static String URL = "jdbc:h2:tst/_tmp/jameleon_test"; protected final static String USERNAME = "sa"; protected final static String PASSWORD = ""; protected final static String createTableSql = "Create Table TEST (ID int, FName varchar(15), LName varchar(25), Phone varchar(15), Birth_Date TIMESTAMP(0))"; Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/data/SqlTagTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/data/SqlTagTest.java 2007-02-06 22:10:11 UTC (rev 1418) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/data/SqlTagTest.java 2007-02-06 22:11:15 UTC (rev 1419) @@ -34,8 +34,8 @@ public class SqlTagTest extends TestCase { private SqlTag sqlTag; - protected final static String DRIVER = "org.hsqldb.jdbcDriver"; - protected final static String URL = "jdbc:hsqldb:tst/_tmp/jameleon_test"; + protected final static String DRIVER = "org.h2.Driver"; + protected final static String URL = "jdbc:h2:tst/_tmp/jameleon_test"; protected final static String USERNAME = "sa"; protected final static String PASSWORD = ""; protected final static String TABLE_NAME = "TEST"; Modified: trunk/jameleon-core/tst/res/test-Applications.properties =================================================================== --- trunk/jameleon-core/tst/res/test-Applications.properties 2007-02-06 22:10:11 UTC (rev 1418) +++ trunk/jameleon-core/tst/res/test-Applications.properties 2007-02-06 22:11:15 UTC (rev 1419) @@ -71,11 +71,21 @@ utf-8.beginAt=/UTF-8.html utf-8.null= -sql.jdbc.driver=org.hsqldb.jdbcDriver -sql.jdbc.url=jdbc:hsqldb:tst/_tmp/jameleon_test +sql.jdbc.driver=org.h2.Driver +sql.jdbc.url=jdbc:h2:tst/_tmp/jameleon_test sql.jdbc.username=sa sql.jdbc.password= +sql2.jdbc.driver=org.h2.Driver +sql2.jdbc.url=jdbc:h2:tst/_tmp/jameleon_test2 +sql2.jdbc.username=sa +sql2.jdbc.password= + +sql3.jdbc.driver=org.h2.Driver +sql3.jdbc.url=jdbc:h2:tst/_tmp/jameleon_data_test +sql3.jdbc.username=sa +sql3.jdbc.password= + subVars.simpleFunctionCompVar1=${one} ${two} propertiesApp.propsVar1=george Modified: trunk/jameleon-core/tst/xml/acceptance/fineGrainedTests.xml =================================================================== --- trunk/jameleon-core/tst/xml/acceptance/fineGrainedTests.xml 2007-02-06 22:10:11 UTC (rev 1418) +++ trunk/jameleon-core/tst/xml/acceptance/fineGrainedTests.xml 2007-02-06 22:11:15 UTC (rev 1419) @@ -354,7 +354,7 @@ script="tst/xml/framework/max_execution_time_exceeded.xml" errorMsgContains="The maximum execution time <10> was exceeded" executionTimeGreaterThan="40" - executionTimeLessThan="100" + executionTimeLessThan="200" checkOutcomeFailed="true"/> <execute-jameleon-script Modified: trunk/jameleon-core/tst/xml/framework/dataDrivableMapVariable.xml =================================================================== --- trunk/jameleon-core/tst/xml/framework/dataDrivableMapVariable.xml 2007-02-06 22:10:11 UTC (rev 1418) +++ trunk/jameleon-core/tst/xml/framework/dataDrivableMapVariable.xml 2007-02-06 22:11:15 UTC (rev 1419) @@ -17,7 +17,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --> -<testcase xmlns="jelly:jameleon" xmlns:jl="jelly:core"> +<testcase xmlns="jelly:jameleon"> <test-case-summary> Tests that subclasses of AbstractDataDrivableTag can map their own variables via the getKeyMapping() method </test-case-summary> @@ -26,14 +26,8 @@ <functional-point-tested>data</functional-point-tested> <application-tested>framework</application-tested> - - <jl:set var="jdbc.driver" value="org.hsqldb.jdbcDriver"/> - <jl:set var="jdbc.url" value="jdbc:hsqldb:tst/_tmp/jameleon_data_test"/> - <jl:set var="jdbc.username" value="sa"/> - <jl:set var="jdbc.password" value=""/> - - <precondition> - <ju-session> + <precondition> + <ju-session application="sql3"> <sql-update functionId="Create a TEST table" sqlUpdateSql="Create Table DATA (var1 varchar(5), var2 varchar(5))"/> @@ -46,7 +40,7 @@ </ju-session> </precondition> - <ju-session> + <ju-session application="sql3"> <sql-test var1ContextName="firstVar" var2ContextName="secondVar" @@ -69,7 +63,7 @@ </ju-session> <postcondition> - <ju-session> + <ju-session application="sql3"> <sql-update functionId="Drop the DATA table" sqlUpdateSql="Drop Table DATA"/> Modified: trunk/jameleon-core/tst/xml/framework/max_execution_time_exceeded.xml =================================================================== --- trunk/jameleon-core/tst/xml/framework/max_execution_time_exceeded.xml 2007-02-06 22:10:11 UTC (rev 1418) +++ trunk/jameleon-core/tst/xml/framework/max_execution_time_exceeded.xml 2007-02-06 22:11:15 UTC (rev 1419) @@ -21,7 +21,8 @@ name="maxExecutionTimeExceeded" maxExecutionTime="10"> <junit-session application="junit"> - <mock.function.tag functionId="Wait for one second" - executionTime="50"/> + <mock.function.tag + functionId="Wait for one second" + executionTime="50"/> </junit-session> </testcase> Modified: trunk/jameleon-core/tst/xml/framework/sqlTagCountRowFalse.xml =================================================================== --- trunk/jameleon-core/tst/xml/framework/sqlTagCountRowFalse.xml 2007-02-06 22:10:11 UTC (rev 1418) +++ trunk/jameleon-core/tst/xml/framework/sqlTagCountRowFalse.xml 2007-02-06 22:11:15 UTC (rev 1419) @@ -24,21 +24,7 @@ <functional-point-tested>sql</functional-point-tested> <application-tested>framework</application-tested> - - <map-variable toVariable="jdbc.driver"> - <variable-value>org.hsqldb.jdbcDriver</variable-value> - </map-variable> - <map-variable toVariable="jdbc.url"> - <variable-value>jdbc:hsqldb:tst/_tmp/jameleon_test</variable-value> - </map-variable> - <map-variable toVariable="jdbc.username"> - <variable-value>sa</variable-value> - </map-variable> - <map-variable toVariable="jdbc.password"> - <variable-value></variable-value> - </map-variable> - - <ju-session> + <ju-session application="sql"> <sql-update functionId="Create a TEST table" sqlUpdateSql="Create Table TEST (ID int, col1 varchar(15), col2 varchar(25), col3 varchar(15))"/> @@ -52,10 +38,10 @@ <sql query="SELECT ID as VAR1, col1 as VAR2, col2 as VAR3, col3 as VAR4 FROM TEST" id="sqlTagTest" - jdbcUsername="${jdbc.username}" - jdbcPassword="${jdbc.password}" - jdbcUrl="${jdbc.url}" - jdbcDriver="${jdbc.driver}"> + jdbcUsername="${sql.jdbc.username}" + jdbcPassword="${sql.jdbc.password}" + jdbcUrl="${sql.jdbc.url}" + jdbcDriver="${sql.jdbc.driver}"> <ju-session> <ju-assert-equals functionId="compare two variables of different column types from a sql tag query" @@ -68,7 +54,7 @@ </ju-session> </sql> - <ju-session> + <ju-session application="sql"> <sql-update functionId="Drop the TEST table" sqlUpdateSql="Drop Table TEST"/> Modified: trunk/jameleon-core/tst/xml/framework/sqlTagCountRowTrue.xml =================================================================== --- trunk/jameleon-core/tst/xml/framework/sqlTagCountRowTrue.xml 2007-02-06 22:10:11 UTC (rev 1418) +++ trunk/jameleon-core/tst/xml/framework/sqlTagCountRowTrue.xml 2007-02-06 22:11:15 UTC (rev 1419) @@ -25,20 +25,7 @@ <application-tested>framework</application-tested> - <map-variable toVariable="jdbc.driver"> - <variable-value>org.hsqldb.jdbcDriver</variable-value> - </map-variable> - <map-variable toVariable="jdbc.url"> - <variable-value>jdbc:hsqldb:tst/_tmp/jameleon_test</variable-value> - </map-variable> - <map-variable toVariable="jdbc.username"> - <variable-value>sa</variable-value> - </map-variable> - <map-variable toVariable="jdbc.password"> - <variable-value></variable-value> - </map-variable> - - <junit-session> + <junit-session application="sql"> <sql-update functionId="Create a TEST table" sqlUpdateSql="Create Table TEST (ID int, col1 varchar(15), col2 varchar(25), col3 varchar(15))"/> @@ -51,10 +38,10 @@ </junit-session> <sql query="SELECT ID as VAR1, col1 as VAR2, col2 as VAR3, col3 as VAR4 FROM TEST" id="sqlTagTest" - jdbcUsername="${jdbc.username}" - jdbcPassword="${jdbc.password}" - jdbcUrl="${jdbc.url}" - jdbcDriver="${jdbc.driver}" + jdbcUsername="${sql.jdbc.username}" + jdbcPassword="${sql.jdbc.password}" + jdbcUrl="${sql.jdbc.url}" + jdbcDriver="${sql.jdbc.driver}" countRow="true"> <junit-session> @@ -68,7 +55,7 @@ simpleFunctionCompVar2="${VAR4}"/> </junit-session> </sql> - <junit-session> + <junit-session application="sql"> <sql-update functionId="Drop the TEST table" sqlUpdateSql="Drop Table TEST"/> Modified: trunk/jameleon-core/tst/xml/framework/sql_update_tag_success.xml =================================================================== --- trunk/jameleon-core/tst/xml/framework/sql_update_tag_success.xml 2007-02-06 22:10:11 UTC (rev 1418) +++ trunk/jameleon-core/tst/xml/framework/sql_update_tag_success.xml 2007-02-06 22:11:15 UTC (rev 1419) @@ -23,6 +23,7 @@ <test-case-level>UNIT</test-case-level> <functional-point-tested>sql</functional-point-tested> <application-tested>framework</application-tested> + <junit-session application="sql"> <map-variable toVariable="textToInsert"> <variable-value>it worked!</variable-value> @@ -63,32 +64,21 @@ </sql-param> </sql-update> </junit-session> - <junit-session> + <junit-session application="sql2"> <sql-update - functionId="Insert another row into test table" - jdbcDriver="org.hsqldb.jdbcDriver" - jdbcUrl="jdbc:hsqldb:tst/_tmp/jameleon_test2" - jdbcUsername="sa" - jdbcPassword=""> + functionId="Insert another row into test table"> create cached table test2( test_str varchar, test_str2 varchar ); </sql-update> <sql-update - functionId="Insert another row into test table" - jdbcDriver="org.hsqldb.jdbcDriver" - jdbcUrl="jdbc:hsqldb:tst/_tmp/jameleon_test2" - jdbcUsername="sa" - jdbcPassword=""> + functionId="Insert another row into test table"> insert into test2(test_str) values('${textToInsert}'); </sql-update> <sql-update - functionId="Delete row from test table" - jdbcDriver="org.hsqldb.jdbcDriver" - jdbcUrl="jdbc:hsqldb:tst/_tmp/jameleon_test2" - jdbcUsername="sa" - jdbcPassword=""><![CDATA[ + functionId="Delete row from test table"> + <![CDATA[ delete from test2 where test_str='some text'; -- some SQL comment -- Another SQL comment This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2007-02-14 16:10:21
|
Revision: 1426 http://svn.sourceforge.net/jameleon/?rev=1426&view=rev Author: engrean Date: 2007-02-14 08:10:14 -0800 (Wed, 14 Feb 2007) Log Message: ----------- Added Feature Request #1659858 - Add an abstract isParent() method to JameleonTestResult Modified Paths: -------------- trunk/jameleon-core/src/java/net/sf/jameleon/result/FunctionResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/JameleonTestResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/TestResultWithChildren.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/FunctionResultTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/JameleonTestResultTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestResultWithChildrenTest.java Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/FunctionResult.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/FunctionResult.java 2007-02-14 16:03:00 UTC (rev 1425) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/FunctionResult.java 2007-02-14 16:10:14 UTC (rev 1426) @@ -79,6 +79,11 @@ return errMsg; } + public boolean isParent() { + // TODO Auto-generated method stub + return false; + } + /** * Tells whether the functional point is a precondition * @return true if this is a precondition, otherwise false Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/JameleonTestResult.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/JameleonTestResult.java 2007-02-14 16:03:00 UTC (rev 1425) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/JameleonTestResult.java 2007-02-14 16:10:14 UTC (rev 1426) @@ -202,6 +202,12 @@ } /** + * Tells whether this result is a parent result or not. + * @return <code>true</code> if this result is a parent result or <code>false</code> + * if it is a leaf node result + */ + public abstract boolean isParent(); + /** * Gets the parent results * * @return The parent result of this result Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/TestResultWithChildren.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/TestResultWithChildren.java 2007-02-14 16:03:00 UTC (rev 1425) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/TestResultWithChildren.java 2007-02-14 16:10:14 UTC (rev 1426) @@ -143,6 +143,10 @@ childrenResults.clear(); } + public boolean isParent() { + return true; + } + /** * @return an XML representation of the results */ Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/result/FunctionResultTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/result/FunctionResultTest.java 2007-02-14 16:03:00 UTC (rev 1425) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/result/FunctionResultTest.java 2007-02-14 16:10:14 UTC (rev 1426) @@ -79,6 +79,10 @@ assertTrue("parent results", resultWithChildren == res5.parentResults); } + public void testIsParent(){ + assertFalse("Should not be a parent", res1.isParent()); + } + public void testGettersSetters(){ assertFalse(res1.isPrecondition()); res1.setPrecondition(true); Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/result/JameleonTestResultTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/result/JameleonTestResultTest.java 2007-02-14 16:03:00 UTC (rev 1425) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/result/JameleonTestResultTest.java 2007-02-14 16:10:14 UTC (rev 1426) @@ -252,6 +252,10 @@ str.append("</test>\n"); return str.toString(); } + + public boolean isParent() { + return false; + } } private class CountableTestResult extends TestResultWithChildren implements CountableResult{ Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestResultWithChildrenTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestResultWithChildrenTest.java 2007-02-14 16:03:00 UTC (rev 1425) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestResultWithChildrenTest.java 2007-02-14 16:10:14 UTC (rev 1426) @@ -37,7 +37,7 @@ public static Test suite() { return new TestSuite( TestResultWithChildrenTest.class ); } - + public TestResultWithChildrenTest( String name ) { super( name ); } @@ -63,6 +63,10 @@ assertTrue(tr.tag == tag); } + public void testIsParent(){ + assertTrue("Should be a parent", trwc.isParent()); + } + public void testGetFailedCountableResults(){ TestResultWithChildren res = new MockCountableResult(createTag("one"), trwc); TestResultWithChildren res2 = new MockCountableResult(createTag("two"), res); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2007-02-15 13:55:41
|
Revision: 1428 http://svn.sourceforge.net/jameleon/?rev=1428&view=rev Author: engrean Date: 2007-02-15 05:55:35 -0800 (Thu, 15 Feb 2007) Log Message: ----------- Looks like switching from hsqldb to h2 solved the problem of having to force the order the tests. Also, changed the behavior of the "test" target to speed up execution. Modified Paths: -------------- trunk/jameleon-core/src/xml/standard-build.xml.fragment Removed Paths: ------------- trunk/jameleon-core/tst/java/TestAll.java Modified: trunk/jameleon-core/src/xml/standard-build.xml.fragment =================================================================== --- trunk/jameleon-core/src/xml/standard-build.xml.fragment 2007-02-14 16:11:28 UTC (rev 1427) +++ trunk/jameleon-core/src/xml/standard-build.xml.fragment 2007-02-15 13:55:35 UTC (rev 1428) @@ -248,7 +248,7 @@ </condition> <echo message="${tests}"/> - <junit printsummary="yes" fork="yes" filtertrace="true" haltonfailure="true"> + <junit printsummary="off" fork="true" filtertrace="true" haltonfailure="true" forkmode="perBatch"> <sysproperty key="basedir" value="${basedir}"/> <sysproperty key="visible" value="${visible}"/> <formatter type="brief" usefile="false"/> Deleted: trunk/jameleon-core/tst/java/TestAll.java =================================================================== --- trunk/jameleon-core/tst/java/TestAll.java 2007-02-14 16:11:28 UTC (rev 1427) +++ trunk/jameleon-core/tst/java/TestAll.java 2007-02-15 13:55:35 UTC (rev 1428) @@ -1,97 +0,0 @@ -/* - Jameleon - An automation testing tool.. - Copyright (C) 2003-2006 Christian W. Hargraves (en...@ho...) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * TestSuite that runs all the tests. - * You can run unit tests in many ways, however this file is designed - * To give you an overall reports of all tests. - * - */ -public class TestAll { - - private TestAll(){} - - public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); - } - - public static Test suite() { - TestSuite suite= new TestSuite("All JUnit Tests"); - suite.addTest(net.sf.jameleon.result.CountableDataDrivableResultTest.suite()); - suite.addTest(net.sf.jameleon.TestScriptTagTest.suite()); - suite.addTest(net.sf.jameleon.TestSuiteTagTest.suite()); - suite.addTest(net.sf.jameleon.ExecuteTestCaseTest.suite()); - suite.addTest(net.sf.jameleon.result.JameleonTestResultTest.suite()); - suite.addTest(net.sf.jameleon.result.TestResultWithChildrenTest.suite()); - suite.addTest(net.sf.jameleon.result.DataDrivableResultTest.suite()); - suite.addTest(net.sf.jameleon.result.TestSuiteResultTest.suite()); - suite.addTest(net.sf.jameleon.result.TestCaseResultTest.suite()); - suite.addTest(net.sf.jameleon.result.FunctionResultTest.suite()); - suite.addTest(net.sf.jameleon.result.SessionResultTest.suite()); - suite.addTest(net.sf.jameleon.util.GenSyntaxReferenceTest.suite()); - suite.addTest(net.sf.jameleon.util.X509TrustEverythingManagerTest.suite()); - suite.addTest(net.sf.jameleon.exception.JameleonScriptExceptionTest.suite()); - suite.addTest(net.sf.jameleon.exception.JameleonExceptionTest.suite()); - suite.addTest(net.sf.jameleon.data.AbstractDataDrivableTagTest.suite()); - suite.addTest(net.sf.jameleon.util.XMLHelperTest.suite()); - suite.addTest(net.sf.jameleon.bean.TestCaseTest.suite()); - suite.addTest(net.sf.jameleon.data.CollectionDataDriverTest.suite()); - suite.addTest(net.sf.jameleon.data.IterateTagTest.suite()); - suite.addTest(net.sf.jameleon.bean.MatchingTextHelperTest.suite()); - suite.addTest(net.sf.jameleon.launch.JameleonLauncherTest.suite()); - suite.addTest(net.sf.jameleon.AbstractParamElementTagTest.suite()); - suite.addTest(net.sf.jameleon.exception.JameleonTagExceptionTest.suite()); - suite.addTest(net.sf.jameleon.TestCaseTagLibraryTest.suite()); - suite.addTest(net.sf.jameleon.event.TestSuiteEventTest.suite()); - suite.addTest(net.sf.jameleon.event.TestSuiteEventHandlerTest.suite()); - suite.addTest(net.sf.jameleon.event.TestCaseEventHandlerTest.suite()); - suite.addTest(net.sf.jameleon.event.DataDrivableEventTest.suite()); - suite.addTest(net.sf.jameleon.event.DataDrivableEventHandlerTest.suite()); - suite.addTest(net.sf.jameleon.event.TestCaseEventTest.suite()); - suite.addTest(net.sf.jameleon.event.FunctionEventHandlerTest.suite()); - suite.addTest(net.sf.jameleon.event.FunctionEventTest.suite()); - suite.addTest(net.sf.jameleon.ui.FunctionalPointTreeTest.suite()); - suite.addTest(net.sf.jameleon.SessionTagTest.suite()); - suite.addTest(net.sf.jameleon.function.FunctionTagTest.suite()); - suite.addTest(net.sf.jameleon.bean.SessionTest.suite()); - suite.addTest(net.sf.jameleon.util.InstanceSerializerTest.suite()); - suite.addTest(net.sf.jameleon.util.SupportedTagsTest.suite()); - suite.addTest(net.sf.jameleon.util.ConfiguratorTest.suite()); - suite.addTest(net.sf.jameleon.data.SqlDataDriverTest.suite()); - suite.addTest(net.sf.jameleon.data.SqlTagTest.suite()); - suite.addTest(net.sf.jameleon.TestCaseTagTest.suite()); - suite.addTest(net.sf.jameleon.CsvTagTest.suite()); - suite.addTest(net.sf.jameleon.function.ContextHelperTest.suite()); - suite.addTest(net.sf.jameleon.function.AttributeBrokerTest.suite()); - suite.addTest(net.sf.jameleon.util.AssertLevelTest.suite()); - suite.addTest(net.sf.jameleon.util.JameleonUtilityTest.suite()); - suite.addTest(net.sf.jameleon.util.StateStorerTest.suite()); - suite.addTest(net.sf.jameleon.bean.AttributeTest.suite()); - suite.addTest(net.sf.jameleon.bean.FunctionalPointTest.suite()); - suite.addTest(net.sf.jameleon.bean.Javadoc2BeanTest.suite()); - suite.addTest(net.sf.jameleon.ant.JameleonXDocletTest.suite()); - suite.addTest(net.sf.jameleon.JameleonTagSupportTest.suite()); - suite.addTest(net.sf.jameleon.taglet.AbstractJameleonTagletTest.suite()); - suite.addTest(net.sf.jameleon.data.CsvDataDriverTest.suite()); - suite.addTest(net.sf.jameleon.data.DataExecuterTest.suite()); - return suite; - } -} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <se...@us...> - 2007-02-19 07:36:09
|
Revision: 1431 http://svn.sourceforge.net/jameleon/?rev=1431&view=rev Author: selie Date: 2007-02-18 23:36:03 -0800 (Sun, 18 Feb 2007) Log Message: ----------- Big update, mainly 3 activities: adding isDataDriven() in results, new template for test case results (replacing test case doc) and getDdResults() in TestCaseTag (temporary) Modified Paths: -------------- trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/FunctionResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/JameleonTestResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/SessionResult.java trunk/jameleon-core/src/java/net/sf/jameleon/result/TestCaseResult.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/JameleonTestResultTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/MockTestResultWithChildren.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestResultWithChildrenTest.java trunk/jameleon-core/tst/xml/acceptance/fineGrainedTests.xml Added Paths: ----------- trunk/jameleon-core/res/TestCaseResultsChildTemplate.txt trunk/jameleon-core/res/TestCaseResultsDataDrivenChildTemplate.txt trunk/jameleon-core/res/TestCaseResultsLeafChildTemplate.txt trunk/jameleon-core/res/TestCaseResultsTemplate.txt Removed Paths: ------------- trunk/jameleon-core/res/TestCaseDocsTemplate.txt Deleted: trunk/jameleon-core/res/TestCaseDocsTemplate.txt =================================================================== --- trunk/jameleon-core/res/TestCaseDocsTemplate.txt 2007-02-15 22:57:15 UTC (rev 1430) +++ trunk/jameleon-core/res/TestCaseDocsTemplate.txt 2007-02-19 07:36:03 UTC (rev 1431) @@ -1,94 +0,0 @@ -<html> - <head> - <title>$!tc.name Documentation</title> - - <style type="text/css"> - table.fields {border: 1px solid #000000;} - tr.alt {background: #C0C0C0;} - td.header {font-weight: bold; white-space: nowrap;} - </style> - </head> - <body bgcolor="#FFFFFF"> - <table width="100%" cellspacing="0" class="fields"> - <tr class="alt"> - <td class="header" width="22%">Test Case</td> - <td colspan="3"> - #if ( $printFileName ) - <a href="$tc.file" target="_new"> - #end - $!tc.name - #if ( $printFileName ) - </a> - #end - </td> - </tr> - <tr> - <td class="header">Summary</td> - <td colspan="3">$!tc.summary</td> - </tr> - <tr><td colspan="4"><hr></td></tr> - <tr><td colspan="4"></td></tr> - <tr><td colspan="4"></td></tr> - <tr><td colspan="4"></td></tr> - <tr class="alt"> - <td class="header">Author</td> - <td>$!tc.author</td> - <td class="header">Feature Tested</td> - <td>$!tc.functionalPointTested</td> - </tr> - <tr> - <td class="header">Application Tested</td> - <td>$!tc.application</td> - <td class="header">Test Level(s)</td> - <td>#foreach ( $level in $tc.testLevels ) $level #end</td> - </tr> - <tr class="alt"> - <td class="header">Bug(s)</td> - <td>#foreach ( $bug in $tc.bugs ) <a href="${bugTrackerUrl}${bug}">$bug</a> #end</td> - <td class="header">Test Case ID</td> - <td>$!tc.testCaseId</td> - </tr> - <tr> - <td class="header">Test Environment</td> - <td>$!tc.testEnvironment</td> - <td class="header">Organization</td> - <td>$!tc.organization</td> - </tr> - <tr class="alt"> - <td class="header">Requirement ID</td> - <td colspan="3">$!tc.testCaseRequirement</td> - </tr> - </table> - <br> - <hr> - <br> - #foreach ( $session in $tc.sessions ) - <table width="100%"> - <tr class="alt"> - <td><b>Execution Steps</b> - #if ( $session.application && $session.application.length() > 0 ) - for the <b>$session.application</b> - #end - #if ( $session.organization && $session.organization.length() > 0 ) - of the <b>$session.organization</b> organization - #end</td> - </tr> - #foreach ( $fp in $session.functionalPoints ) - <tr> - <td><b>$velocityCount</b>. $fp.functionId - #if ( $fp.steps.size() > 0 ) - <table> - #foreach ( $step in $fp.steps ) - <tr><td> - <b>·</b> $step - </td></tr> - #end - </table> - #end - </td> - </tr> - #end - </table> - #end - </body> -</html> Added: trunk/jameleon-core/res/TestCaseResultsChildTemplate.txt =================================================================== --- trunk/jameleon-core/res/TestCaseResultsChildTemplate.txt (rev 0) +++ trunk/jameleon-core/res/TestCaseResultsChildTemplate.txt 2007-02-19 07:36:03 UTC (rev 1431) @@ -0,0 +1,13 @@ +#foreach ( $results in $results.getChildrenResults() ) + + #set( $shortDesc = $results.getIdentifier() ) + + #if ($results.isDataDriven()) + #parse("TestCaseResultsDataDrivenChildTemplate.txt") + #elseif ($results.isParent()) + <b>Steps for <i>$results.getElementName()</i></b><br/> + #parse("TestCaseResultsChildTemplate.txt") + #else + #parse("TestCaseResultsLeafChildTemplate.txt") + #end +#end Property changes on: trunk/jameleon-core/res/TestCaseResultsChildTemplate.txt ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/jameleon-core/res/TestCaseResultsDataDrivenChildTemplate.txt =================================================================== --- trunk/jameleon-core/res/TestCaseResultsDataDrivenChildTemplate.txt (rev 0) +++ trunk/jameleon-core/res/TestCaseResultsDataDrivenChildTemplate.txt 2007-02-19 07:36:03 UTC (rev 1431) @@ -0,0 +1,52 @@ + +<div> + <img src="../res/icons/${results.getOutcome()}.gif"> + <a href="javascript:showInfo('$results.hashCode()_$results.getRowNum()_data')"><i>i</i></a> + <img onclick="showBranch('$results.hashCode()_$results.getRowNum()');swapIcon('$results.hashCode()_$results.getRowNum()','$results.hashCode()_$results.getRowNum()_img')" + src="../res/icons/plus.gif" border="0" id="$results.hashCode()_$results.getRowNum()_img"> + $shortDesc - row $results.getRowNum() +</div> + +<span id="$results.hashCode()_$results.getRowNum()_data" class="branch"> + <blockquote> + <table><tr><td> + <table class="attributes_value"> + <tr> + <td colspan="2"><$results.getElementName()/></td> + </tr> + <tr> + <th>attribute</th> + <th>value</th> + </tr> + #foreach ( $attr in $results.getTag().getAttributes() ) + #if ( $attr.isValueSet() ) + <tr> + <td>$attr.getName()</td> + <td>$attr.getValue()</td> + </tr> + #end + #end + </table> + </td><td> + <table class="key_value"> + <tr> + <td colspan="2">$results.getElementName() data</td> + </tr> + <tr> + <th>variable</th> + <th>value</th> + </tr> + #foreach ( $key in $results.getRowData().keySet() ) + <tr> + <td class='key_value'>$key</td> + <td> $results.getRowData().get($key)</td> + </tr> + #end + </table> + </td></tr></table> + </blockquote> +</span> +<span id="$results.hashCode()_$results.getRowNum()" class="branch"> + #parse("TestCaseResultsChildTemplate.txt") +</span> + Property changes on: trunk/jameleon-core/res/TestCaseResultsDataDrivenChildTemplate.txt ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/jameleon-core/res/TestCaseResultsLeafChildTemplate.txt =================================================================== --- trunk/jameleon-core/res/TestCaseResultsLeafChildTemplate.txt (rev 0) +++ trunk/jameleon-core/res/TestCaseResultsLeafChildTemplate.txt 2007-02-19 07:36:03 UTC (rev 1431) @@ -0,0 +1,44 @@ +<img src="../res/icons/${results.getOutcome()}.gif"> +<a href="javascript:showInfo('$results.hashCode()_data')"><i>i</i></a> +<img onclick="showBranch('$results.hashCode()');swapIcon('$results.hashCode()','$results.hashCode()_img')" + src="../res/icons/plus.gif" border="0" id="$results.hashCode()_img"> +<img src="../res/icons/snapShot.gif"> +<img src="../res/icons/bullet.gif">$shortDesc<br/> + +#if ( $results.failed() ) + $results.getErrorMsg() + #foreach ( $st in $results.getError().getStackTrace() ) + $st + #end +#end + +<span id="$results.hashCode()_data" class="branch"> +<blockquote> + <table class="attributes_value"> + <tr> + <td colspan="2"><$results.getElementName()/></td> + </tr> + <tr> + <th>attribute</th> + <th>value</th> + </tr> + #foreach ( $attr in $results.getTag().getAttributes() ) + #if ( $attr.isValueSet() ) + <tr> + <td>$attr.getName()</td> + <td>$attr.getValue()</td> + </tr> + #end + #end + </table> +</blockquote> +</span> +<span id="$results.hashCode()" class="branch"> +<blockquote> + <ol class="steps_value"> + #foreach ( $step in $results.getTag().getSteps() ) + <li>$step</li> + #end + </ol> +</blockquote> +</span> \ No newline at end of file Property changes on: trunk/jameleon-core/res/TestCaseResultsLeafChildTemplate.txt ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/jameleon-core/res/TestCaseResultsTemplate.txt =================================================================== --- trunk/jameleon-core/res/TestCaseResultsTemplate.txt (rev 0) +++ trunk/jameleon-core/res/TestCaseResultsTemplate.txt 2007-02-19 07:36:03 UTC (rev 1431) @@ -0,0 +1,82 @@ +<html> + <head> + <title>$!tc.name Documentation</title> + + <style type="text/css" media="all">@import url("../res/testCaseDocs.css");</style> + <script language="JavaScript" src="../res/testCaseDocs.js"></script> + </head> + <body> + <table width="100%" cellspacing="0" class="fields"> + #if ( $printFileName ) + <tr> + <td class="header">Test Case Script</td> + <td><a href="$tc.file" target="_new">$tc.file</a></td> + </tr> + #end + <tr class="alt"> + <td class="header" width="22%">Test Case</td><td>$!tc.name</td> + </tr> + <tr> + <td class="header">Summary</td><td>$!tc.summary</td> + </tr> + <tr class="alt"> + <td class="header">Author</td><td>$!tc.author</td> + </tr> + <tr> + <td class="header">Application Tested</td><td>$!tc.application</td> + </tr> + <tr class="alt"> + <td class="header">Feature Tested</td><td>$!tc.functionalPointTested</td> + </tr> + <tr> + <td class="header">Test Level(s)</td><td>#foreach ( $level in $tc.testLevels ) $level #end</td> + </tr> + <tr class="alt"> + <td class="header">Bug(s)</td><td>#foreach ( $bug in $tc.bugs ) <a href="${bugTrackerUrl}${bug}">$bug</a> #end</td> + </tr> + <tr> + <td class="header">Test Environment</td><td>$!tc.testEnvironment</td> + </tr> + <tr class="alt"> + <td class="header">Organization</td><td>$!tc.organization</td> + </tr> + <tr> + <td class="header">Test Case ID</td><td>$!tc.testCaseId</td> + </tr> + <tr class="alt"> + <td class="header">Requirement ID</td><td>$!tc.testCaseRequirement</td> + </tr> + </table> + <br> + <table width="100%" class="key_value"> + <tr class="alt"> + <th width="15%">Execution Time</th> + <th width="10%"># Run</th> + <th width="10%"># Fail</th> + <th width="15%">Pass</th> + <th width="50%">Failures</th> + </tr> + <tr> + <td>$results.executionTime</td> + <td>$results.getCountableResults().size()</td> + <td>$results.getFailedCountableResults().size()</td> + <td>To Be Calculated</td> + <td> + #foreach ( $failedResult in $results.getFailedCountableResults() ) + #if ( $failedResult.isParent() ) + ## This has to be recursive + #foreach ( $failedResult2 in $failedResult.getChildrenResults() ) + $failedResult2.getErrorMsg() <br/> + #end + #else + $failedResult.getErrorMsg() + #end + #end + </td> + </tr> + </table> + <hr> + <br> + #parse("TestCaseResultsChildTemplate.txt") + </body> +</html> Property changes on: trunk/jameleon-core/res/TestCaseResultsTemplate.txt ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Modified: trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java 2007-02-15 22:57:15 UTC (rev 1430) +++ trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java 2007-02-19 07:36:03 UTC (rev 1431) @@ -41,12 +41,7 @@ import net.sf.jameleon.result.DataDrivableResult; import net.sf.jameleon.result.JameleonTestResult; import net.sf.jameleon.result.TestCaseResult; -import net.sf.jameleon.util.AssertLevel; -import net.sf.jameleon.util.Configurator; -import net.sf.jameleon.util.JameleonDefaultValues; -import net.sf.jameleon.util.JameleonUtility; -import net.sf.jameleon.util.StateStorer; -import net.sf.jameleon.util.TestCaseDocsTransformer; +import net.sf.jameleon.util.*; import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.jelly.JellyException; @@ -100,8 +95,8 @@ protected boolean trace; protected boolean genTestCaseDocs = true; protected boolean executeTestCase = true; - public static final String GEN_TEST_CASE_DOCS_TEMPLATE_DEFAULT = "TestCaseDocsTemplate.txt"; protected String genTestCaseDocsTemplate = GEN_TEST_CASE_DOCS_TEMPLATE_DEFAULT; + public static final String GEN_TEST_CASE_DOCS_TEMPLATE_DEFAULT = "TestCaseResultsTemplate.txt"; protected TestCaseEventHandler eventHandler = TestCaseEventHandler.getInstance(); protected long startTime; @@ -118,8 +113,14 @@ * The test case results which are a complete set of results for every tag executed. */ protected TestCaseResult results; + //TODO: Remove this. This is a workaround to get correct failed and passed results protected DataDrivableResult ddResult; + //TODO: Remove this also. Additional getter required to get row number in session tag if useCSV=true + public DataDrivableResult getDdResult() { + return ddResult; + } + protected ArrayList keysSet = new ArrayList(); protected TestCase testCase = new TestCase(); @@ -773,9 +774,6 @@ tearDown(); throw jse; } - if (genTestCaseDocs) { - generateDocs(); - } try{ if (executeTestCase) { if (useCSV) { @@ -783,6 +781,12 @@ }else{ executeNoCSV(); } + // selie: I would have put this in the finally block but some acceptance tests are failing + // because this needs to be executed before the log.info(results) statement. + // TODO: move in finally block when log4j is not used for results anymore + if (genTestCaseDocs) { + generateResults(); + } if (maxExecutionTime > 0 && maxExecutionTime < results.getExecutionTime()) { String msg = "The maximum execution time <"+maxExecutionTime+"> was exceeded <"+results.getExecutionTime()+">!"; results.setError(new JameleonScriptException(msg, this)); @@ -902,22 +906,25 @@ } /** - * If isGenTestCaseDocs is true, then this method is called before the test is actually - * run. A complete pass through is completed and everything is then reset. + * generate a result file for the testcase */ - protected void generateDocs(){ - File htmlFile = new File(getResultsDir(), "doc"+File.separator+name+".html"); + protected void generateResults(){ + File htmlFile = new File(getResultsDir(), File.separator+name+".html"); TestCaseDocsTransformer xfrmr = new TestCaseDocsTransformer(genTestCaseDocsTemplate); HashMap vars = new HashMap(); if (bugTrackerUrl != null) { vars.put("bugTrackerUrl", bugTrackerUrl ); } + vars.put("tc", getTestCase()); + vars.put("results", getResults()); vars.put("printFileName", Boolean.TRUE); + xfrmr.transform(htmlFile, vars); results.setTestCaseDocsFile(htmlFile.getPath()); } + private InputStream getInputStream(String fileName){ ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); InputStream input = null; Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java 2007-02-15 22:57:15 UTC (rev 1430) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/DataDrivableResult.java 2007-02-19 07:36:03 UTC (rev 1431) @@ -46,6 +46,10 @@ super(tag, parentResults); } + public boolean isDataDriven() { + return true; + } + public Map getRowData(){ return rowData; } Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/FunctionResult.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/FunctionResult.java 2007-02-15 22:57:15 UTC (rev 1430) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/FunctionResult.java 2007-02-19 07:36:03 UTC (rev 1431) @@ -80,10 +80,13 @@ } public boolean isParent() { - // TODO Auto-generated method stub return false; } + public boolean isDataDriven() { + return false; + } + /** * Tells whether the functional point is a precondition * @return true if this is a precondition, otherwise false Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/JameleonTestResult.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/JameleonTestResult.java 2007-02-15 22:57:15 UTC (rev 1430) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/JameleonTestResult.java 2007-02-19 07:36:03 UTC (rev 1431) @@ -207,7 +207,15 @@ * if it is a leaf node result */ public abstract boolean isParent(); + /** + * Tells whether this result is data driven or not. + * @return <code>true</code> if this result is a data driven result or <code>false</code> + * if it is not. + */ + public abstract boolean isDataDriven(); + + /** * Gets the parent results * * @return The parent result of this result Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/SessionResult.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/SessionResult.java 2007-02-15 22:57:15 UTC (rev 1430) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/SessionResult.java 2007-02-19 07:36:03 UTC (rev 1431) @@ -43,6 +43,10 @@ super(tag, parentResults); } + public boolean isDataDriven() { + return false; + } + /** * @return a XML String representation of the results */ Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/TestCaseResult.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/TestCaseResult.java 2007-02-15 22:57:15 UTC (rev 1430) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/TestCaseResult.java 2007-02-19 07:36:03 UTC (rev 1431) @@ -139,6 +139,10 @@ countFailure(); } + public boolean isDataDriven() { + return (getTag().getAttribute("useCSV").equals("true")); + } + ///////////////////////////////////////////////////////////////////////////////// // CountableResult methods // ///////////////////////////////////////////////////////////////////////////////// Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/result/JameleonTestResultTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/result/JameleonTestResultTest.java 2007-02-15 22:57:15 UTC (rev 1430) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/result/JameleonTestResultTest.java 2007-02-19 07:36:03 UTC (rev 1431) @@ -245,6 +245,14 @@ super(tag, parentResults); } + public boolean isParent() { + return false; + } + + public boolean isDataDriven() { + return false; + } + public String toXML(){ StringBuffer str = new StringBuffer(); str.append("<test>\n"); @@ -253,9 +261,6 @@ return str.toString(); } - public boolean isParent() { - return false; - } } private class CountableTestResult extends TestResultWithChildren implements CountableResult{ @@ -270,6 +275,10 @@ super(tag, parentResults); } + public boolean isDataDriven() { + return false; + } + public void countFailure(){ countableFailure = true; } Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/result/MockTestResultWithChildren.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/result/MockTestResultWithChildren.java 2007-02-15 22:57:15 UTC (rev 1430) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/result/MockTestResultWithChildren.java 2007-02-19 07:36:03 UTC (rev 1431) @@ -35,5 +35,9 @@ super(tag, parentResult); } + public boolean isDataDriven() { + return false; + } + } Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestResultWithChildrenTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestResultWithChildrenTest.java 2007-02-15 22:57:15 UTC (rev 1430) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestResultWithChildrenTest.java 2007-02-19 07:36:03 UTC (rev 1431) @@ -163,6 +163,10 @@ super(tag, parentResult); } + public boolean isDataDriven() { + return false; + } + public String toXML(){ StringBuffer sb = new StringBuffer("<mock-tr>"); sb.append(super.toXML()); Modified: trunk/jameleon-core/tst/xml/acceptance/fineGrainedTests.xml =================================================================== --- trunk/jameleon-core/tst/xml/acceptance/fineGrainedTests.xml 2007-02-15 22:57:15 UTC (rev 1430) +++ trunk/jameleon-core/tst/xml/acceptance/fineGrainedTests.xml 2007-02-19 07:36:03 UTC (rev 1431) @@ -202,14 +202,14 @@ script="tst/xml/framework/jameleon_test_case_test.xml" checkOutcomePassed="true" checkHtmlRowPassed="true" - testCaseDocsFile="./jameleon_test_results/jameleon_test_case_test/doc/jameleon_test_case_test.html"/> + testCaseDocsFile="./jameleon_test_results/jameleon_test_case_test/jameleon_test_case_test.html"/> <execute-jameleon-script functionId="failing script" script="tst/xml/framework/jameleon_test_case_test_failure.xml" checkOutcomeFailed="true" checkHtmlRowFailed="true" - testCaseDocsFile="./jameleon_test_results/jameleon_test_case_test_failure/doc/jameleon_test_case_test_failure.html"/> + testCaseDocsFile="./jameleon_test_results/jameleon_test_case_test_failure/jameleon_test_case_test_failure.html"/> <execute-jameleon-script functionId="functional points aren't executed in a csv tag when a function fails inside a nested csv tag." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2007-02-19 19:43:45
|
Revision: 1433 http://svn.sourceforge.net/jameleon/?rev=1433&view=rev Author: engrean Date: 2007-02-19 11:43:43 -0800 (Mon, 19 Feb 2007) Log Message: ----------- Adding files included in zip file and removing zip file. This is for the HTML results refactor Added Paths: ----------- trunk/jameleon-core/res/icons/bullet.gif trunk/jameleon-core/res/icons/minus.gif trunk/jameleon-core/res/icons/plus.gif trunk/jameleon-core/res/testCaseDocs.css trunk/jameleon-core/res/testCaseDocs.js Removed Paths: ------------- trunk/jameleon-core/unzip_in_jameleon_test_results.zip Added: trunk/jameleon-core/res/icons/bullet.gif =================================================================== (Binary files differ) Property changes on: trunk/jameleon-core/res/icons/bullet.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/jameleon-core/res/icons/minus.gif =================================================================== (Binary files differ) Property changes on: trunk/jameleon-core/res/icons/minus.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/jameleon-core/res/icons/plus.gif =================================================================== (Binary files differ) Property changes on: trunk/jameleon-core/res/icons/plus.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/jameleon-core/res/testCaseDocs.css =================================================================== --- trunk/jameleon-core/res/testCaseDocs.css (rev 0) +++ trunk/jameleon-core/res/testCaseDocs.css 2007-02-19 19:43:43 UTC (rev 1433) @@ -0,0 +1,57 @@ +table.fields { + border: 1px solid #000000; +} +table.key_value { + border-collapse: separate; + font: 8pt Verdana,sans-serif; +} +table.key_value th { + border: 1px solid #000000; + border-width: 1px 1px 1px 1px; +} +table.key_value td{ + border: 1px solid #000000; + border-width: 1px 1px 1px 1px; +} +table.steps_value { + border-collapse: separate; + font: 8pt Verdana,sans-serif; +} +table.steps_value th { + border: 1px solid #000000; + border-width: 1px 1px 1px 1px; +} +table.steps_value td{ + border: 1px solid #000000; + border-width: 1px 1px 1px 1px; +} +table.attributes_value { + border-collapse: separate; + font: 8pt Verdana,sans-serif; +} +table.attributes_value th { + border: 1px solid #000000; + border-width: 1px 1px 1px 1px; +} +table.attributes_value td{ + border: 1px solid #000000; + border-width: 1px 1px 1px 1px; +} +tr.alt { + background: #C0C0C0; +} +td.header { + font-weight: bold; + white-space: nowrap; +} +body{ + font: 10pt Verdana,sans-serif; + color: navy; +} +.branch{ + display: none; + margin-left: 16px; +} +.branch_displayed{ + margin-left: 16px; +} Property changes on: trunk/jameleon-core/res/testCaseDocs.css ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/jameleon-core/res/testCaseDocs.js =================================================================== --- trunk/jameleon-core/res/testCaseDocs.js (rev 0) +++ trunk/jameleon-core/res/testCaseDocs.js 2007-02-19 19:43:43 UTC (rev 1433) @@ -0,0 +1,32 @@ +var openImg = new Image(); +openImg.src = "../../res/icons/minus.gif"; +var closedImg = new Image(); +closedImg.src = "../../res/icons/plus.gif"; + +function showBranch(branch) { + var objBranch = + document.getElementById(branch).style; + if(objBranch.display=="block") + objBranch.display="none"; + else + objBranch.display="block"; +} + +function swapIcon(branch,img) { + var objBranch = + document.getElementById(branch).style; + objImg = document.getElementById(img); + if(objBranch.display=="block") + objImg.src = openImg.src; + else + objImg.src = closedImg.src; +} + +function showInfo(id) { + var obj = + document.getElementById(id).style; + if(obj.display=="block") + obj.display="none"; + else + obj.display="block"; +} Property changes on: trunk/jameleon-core/res/testCaseDocs.js ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Deleted: trunk/jameleon-core/unzip_in_jameleon_test_results.zip =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2007-02-19 19:44:46
|
Revision: 1434 http://svn.sourceforge.net/jameleon/?rev=1434&view=rev Author: engrean Date: 2007-02-19 11:44:42 -0800 (Mon, 19 Feb 2007) Log Message: ----------- code clean up. Modified Paths: -------------- trunk/jameleon-core/src/java/net/sf/jameleon/bean/Attribute.java trunk/jameleon-core/src/java/net/sf/jameleon/sql/SqlUpdateTag.java trunk/jameleon-core/tst/xml/framework/sql_update_tag_success.xml Modified: trunk/jameleon-core/src/java/net/sf/jameleon/bean/Attribute.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/bean/Attribute.java 2007-02-19 19:43:43 UTC (rev 1433) +++ trunk/jameleon-core/src/java/net/sf/jameleon/bean/Attribute.java 2007-02-19 19:44:42 UTC (rev 1434) @@ -73,7 +73,7 @@ * @return The attribute's name */ public String getName(){ - return this.name; + return name; } /** @@ -88,7 +88,7 @@ * @return A description about how the attribute is used */ public String getDescription(){ - return this.description; + return description; } /** @@ -103,7 +103,7 @@ * @return The type of the attribute */ public String getType(){ - return this.type; + return type; } /** @@ -118,14 +118,14 @@ * @return <code>true</code> if this attribute is required */ public boolean isRequired(){ - return this.required; + return required; } /** * @return <code>true</code> if the value of the attribute was set */ public boolean isValueSet(){ - return this.valueSet; + return valueSet; } /** @@ -140,7 +140,7 @@ * @return The attribute's value */ public Object getValue(){ - return this.value; + return value; } /** Modified: trunk/jameleon-core/src/java/net/sf/jameleon/sql/SqlUpdateTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/sql/SqlUpdateTag.java 2007-02-19 19:43:43 UTC (rev 1433) +++ trunk/jameleon-core/src/java/net/sf/jameleon/sql/SqlUpdateTag.java 2007-02-19 19:44:42 UTC (rev 1434) @@ -92,7 +92,9 @@ conn.rollback(); throw sqle; }finally{ - stmt.close(); + if (stmt != null) { + stmt.close(); + } } } Modified: trunk/jameleon-core/tst/xml/framework/sql_update_tag_success.xml =================================================================== --- trunk/jameleon-core/tst/xml/framework/sql_update_tag_success.xml 2007-02-19 19:43:43 UTC (rev 1433) +++ trunk/jameleon-core/tst/xml/framework/sql_update_tag_success.xml 2007-02-19 19:44:42 UTC (rev 1434) @@ -66,18 +66,18 @@ </junit-session> <junit-session application="sql2"> <sql-update - functionId="Insert another row into test table"> + functionId="Create a 'test2' table"> create cached table test2( test_str varchar, test_str2 varchar ); </sql-update> <sql-update - functionId="Insert another row into test table"> + functionId="Insert another row into test2 table"> insert into test2(test_str) values('${textToInsert}'); </sql-update> <sql-update - functionId="Delete row from test table"> + functionId="Delete row from test2 table"> <![CDATA[ delete from test2 where test_str='some text'; -- some SQL comment This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2007-02-19 19:51:38
|
Revision: 1435 http://svn.sourceforge.net/jameleon/?rev=1435&view=rev Author: engrean Date: 2007-02-19 11:51:37 -0800 (Mon, 19 Feb 2007) Log Message: ----------- Moved call to generateResults to the finally block in doTag(). Pulled out logic to get the results file. Populate the results.resultsFile in the setUp() method Modified Paths: -------------- trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java trunk/jameleon-core/tst/java/net/sf/jameleon/TestCaseTagTest.java Modified: trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java 2007-02-19 19:44:42 UTC (rev 1434) +++ trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java 2007-02-19 19:51:37 UTC (rev 1435) @@ -99,6 +99,7 @@ public static final String GEN_TEST_CASE_DOCS_TEMPLATE_DEFAULT = "TestCaseResultsTemplate.txt"; protected TestCaseEventHandler eventHandler = TestCaseEventHandler.getInstance(); protected long startTime; + protected File resultsFile; /** * DEFAULT - true. @@ -717,6 +718,9 @@ name = testCase.getName(); } results.setTestName(name); + if(getResultsFile() != null){ + results.setTestCaseDocsFile(getResultsFile().getPath()); + } loadJameleonConfig(); //Must load this after loading the values from jameleon.conf //so that it can be set from both places. @@ -781,17 +785,10 @@ }else{ executeNoCSV(); } - // selie: I would have put this in the finally block but some acceptance tests are failing - // because this needs to be executed before the log.info(results) statement. - // TODO: move in finally block when log4j is not used for results anymore - if (genTestCaseDocs) { - generateResults(); - } if (maxExecutionTime > 0 && maxExecutionTime < results.getExecutionTime()) { String msg = "The maximum execution time <"+maxExecutionTime+"> was exceeded <"+results.getExecutionTime()+">!"; results.setError(new JameleonScriptException(msg, this)); } - if ( failOnCSVFileNotFound || (!failOnCSVFileNotFound && !failedOnDataDriver) ) { log.info(results); if (results.failed()) { @@ -810,7 +807,6 @@ jte = createExceptionFromResult(result); } } - } if (jte != null) { if (results.getError() != null) { @@ -822,6 +818,9 @@ } } }finally{ + if (genTestCaseDocs) { + generateResults(); + } eventHandler.endTestCase(this); tearDown(); } @@ -857,18 +856,8 @@ }catch(FileNotFoundException fnfe){ failedOnDataDriver = true; results.setError(fnfe); -/* - if (failOnCSVFileNotFound) { - results.incrementRowsFailed(); - } -*/ }catch(IOException ioe){ failedOnDataDriver = true; -/* - if (failOnCSVFileNotFound) { - results.incrementRowsFailed(); - } -*/ results.setError(new JameleonScriptException(" Trouble parsing "+getCsvFile())); }catch(IllegalStateException ise){ failedOnDataDriver = true; @@ -909,7 +898,7 @@ * generate a result file for the testcase */ protected void generateResults(){ - File htmlFile = new File(getResultsDir(), File.separator+name+".html"); + File htmlFile = getResultsFile(); TestCaseDocsTransformer xfrmr = new TestCaseDocsTransformer(genTestCaseDocsTemplate); HashMap vars = new HashMap(); if (bugTrackerUrl != null) { @@ -921,9 +910,18 @@ vars.put("printFileName", Boolean.TRUE); xfrmr.transform(htmlFile, vars); - results.setTestCaseDocsFile(htmlFile.getPath()); } + /** + * Gets the results file that represents the test case execution. + * @return the results file that represents the test case execution. + */ + protected File getResultsFile(){ + if (genTestCaseDocs && resultsFile == null) { + resultsFile = new File(getResultsDir(), File.separator+name+".html"); + } + return resultsFile; + } private InputStream getInputStream(String fileName){ ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/TestCaseTagTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/TestCaseTagTest.java 2007-02-19 19:44:42 UTC (rev 1434) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/TestCaseTagTest.java 2007-02-19 19:51:37 UTC (rev 1435) @@ -100,7 +100,18 @@ public void tearDown(){ Configurator.clearInstance(); } - + + public void testGetResultsFile(){ + tct.setName("name"); + assertNull("results file should be null", tct.resultsFile); + tct.setGenTestCaseDocs(false); + assertNull("results file should be null", tct.getResultsFile()); + tct.setGenTestCaseDocs(true); + File f = tct.getResultsFile(); + assertTrue("results file path",f.getPath().endsWith("jameleon_test_results"+File.separator+"name"+File.separator+"name.html")); + assertEquals("results file", f, tct.resultsFile); + } + public void testExecuteDrivableRow() throws Exception{ MockTestCase2Tag mTct = new MockTestCase2Tag(); mTct.setContext(new JellyContext()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <en...@us...> - 2007-02-21 17:35:12
|
Revision: 1447 http://svn.sourceforge.net/jameleon/?rev=1447&view=rev Author: engrean Date: 2007-02-21 09:35:08 -0800 (Wed, 21 Feb 2007) Log Message: ----------- Made FunctionalPoint and Attribute cloneable and added the intial support for displaying the values in the results. Modified Paths: -------------- trunk/jameleon-core/src/java/net/sf/jameleon/SessionTag.java trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java trunk/jameleon-core/src/java/net/sf/jameleon/bean/Attribute.java trunk/jameleon-core/src/java/net/sf/jameleon/bean/FunctionalPoint.java trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java trunk/jameleon-core/src/java/net/sf/jameleon/function/FunctionTag.java trunk/jameleon-core/src/java/net/sf/jameleon/util/InstanceSerializer.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/AttributeTest.java trunk/jameleon-core/tst/java/net/sf/jameleon/bean/FunctionalPointTest.java Modified: trunk/jameleon-core/src/java/net/sf/jameleon/SessionTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/SessionTag.java 2007-02-21 17:33:37 UTC (rev 1446) +++ trunk/jameleon-core/src/java/net/sf/jameleon/SessionTag.java 2007-02-21 17:35:08 UTC (rev 1447) @@ -28,6 +28,7 @@ import org.apache.log4j.Logger; import net.sf.jameleon.Storable; +import net.sf.jameleon.bean.FunctionalPoint; import net.sf.jameleon.data.AbstractDataDrivableTag; import net.sf.jameleon.exception.JameleonScriptException; import net.sf.jameleon.result.DataDrivableResult; @@ -217,12 +218,18 @@ tc.setOrganization(tcOrganization); context.setVariable("organization", tcOrganization); } - props = new Properties(); - traceMsg("Ending Session: \""+getFunctionalPoint().getDefaultTagName()+"\""); - traceMsg("\n"); - tearDownSession(); + tearDown(); } } + + protected void tearDown(){ + props = new Properties(); + traceMsg("Ending Session: \""+getFunctionalPoint().getDefaultTagName()+"\""); + traceMsg("\n"); + tearDownSession(); + sessionResults.setTag((FunctionalPoint)fp.clone()); + resetFunctionalPoint(); + } /** * Used for the trace functionality. Only sends info to the log if trace is enabled. Modified: trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java 2007-02-21 17:33:37 UTC (rev 1446) +++ trunk/jameleon-core/src/java/net/sf/jameleon/TestCaseTag.java 2007-02-21 17:35:08 UTC (rev 1447) @@ -33,6 +33,7 @@ import java.util.ResourceBundle; import java.util.Set; +import net.sf.jameleon.bean.FunctionalPoint; import net.sf.jameleon.bean.TestCase; import net.sf.jameleon.data.DataDrivable; import net.sf.jameleon.event.TestCaseEventHandler; @@ -879,6 +880,8 @@ while (it.hasNext()) { context.removeVariable((String)it.next()); } + results.setTag((FunctionalPoint)fp.clone()); + resetFunctionalPoint(); } protected void setStateStoreOptions(){ Modified: trunk/jameleon-core/src/java/net/sf/jameleon/bean/Attribute.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/bean/Attribute.java 2007-02-21 17:33:37 UTC (rev 1446) +++ trunk/jameleon-core/src/java/net/sf/jameleon/bean/Attribute.java 2007-02-21 17:35:08 UTC (rev 1447) @@ -18,7 +18,7 @@ import net.sf.jameleon.XMLable; -public class Attribute implements XMLable{ +public class Attribute implements XMLable, Cloneable{ private static final long serialVersionUID = 1L; /** * The attribute's name @@ -247,4 +247,15 @@ } return str; } + + public Object clone() { + Attribute attr = null; + try{ + attr = (Attribute) super.clone(); + attr.value = value; + }catch(CloneNotSupportedException cnse){ + System.err.println("Could not create a clone of "+toXML()); + } + return attr; + } } Modified: trunk/jameleon-core/src/java/net/sf/jameleon/bean/FunctionalPoint.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/bean/FunctionalPoint.java 2007-02-21 17:33:37 UTC (rev 1446) +++ trunk/jameleon-core/src/java/net/sf/jameleon/bean/FunctionalPoint.java 2007-02-21 17:35:08 UTC (rev 1447) @@ -16,9 +16,9 @@ */ package net.sf.jameleon.bean; +import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashMap; -import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -30,7 +30,7 @@ * documentation generation. Please see the docs on the instance variables for a full understanding of what * a FunctionalPoint is */ -public class FunctionalPoint implements XMLable { +public class FunctionalPoint implements XMLable, Cloneable { private static final long serialVersionUID = 1L; /** * The name of the developer that wrote this <code>FunctionalPoint</code> @@ -39,7 +39,7 @@ /** * The applications supported by this functional point */ - protected LinkedList applications; + protected ArrayList applications; /** * The name of the class that this tag represents. */ @@ -47,7 +47,7 @@ /** * The tags to be used in the test case macro language */ - protected LinkedList tagNames; + protected ArrayList tagNames; /** * A short summary about how this functional can be used */ @@ -72,20 +72,20 @@ /** * A list of steps that this FunctionalPoint uses during execution */ - protected LinkedList steps; + protected ArrayList steps; /** * Default constructor only used to initialize variables */ public FunctionalPoint() { author = new String(); - tagNames = new LinkedList(); + tagNames = new ArrayList(); description = new String(); shortDescription = new String(); type = new String(); attributes = new LinkedHashMap(); - steps = new LinkedList(); - applications = new LinkedList(); + steps = new ArrayList(); + applications = new ArrayList(); className = new String(); } @@ -142,7 +142,7 @@ * Gets the applications supported by this functional point * @return The applications supported by this functional point */ - public LinkedList getApplications(){ + public ArrayList getApplications(){ return applications; } @@ -289,7 +289,7 @@ /** * @return A list of steps that this FunctionalPoint uses during execution */ - public LinkedList getSteps(){ + public List getSteps(){ return steps; } @@ -297,9 +297,29 @@ * Sets a list of steps that this FunctionalPoint uses during execution * @param steps - A list of steps that this FunctionalPoint uses during execution */ - public void setSteps(LinkedList steps){ + public void setSteps(ArrayList steps){ this.steps = steps; } + + public Object clone(){ + FunctionalPoint fp = null; + try{ + fp = (FunctionalPoint)super.clone(); + fp.applications = (ArrayList) applications.clone(); + fp.steps = (ArrayList)steps.clone(); + fp.tagNames = (ArrayList)tagNames.clone(); + fp.attributes = new LinkedHashMap(attributes.size()); + Attribute attr; + for (Iterator it = attributes.keySet().iterator(); it.hasNext(); ){ + attr = (Attribute)attributes.get(it.next()); + attr = (Attribute)attr.clone(); + fp.addAttribute(attr); + } + }catch(CloneNotSupportedException cnse){ + // TODO: handle this exception + } + return fp; + } public String toXML(){ Iterator it = null; @@ -361,8 +381,7 @@ if (obj instanceof FunctionalPoint) { List otherTagNames = (((FunctionalPoint)obj).getTagNames()); equals = getTagNames().size() == otherTagNames.size(); - Iterator it = otherTagNames.iterator(); - while (it.hasNext()) { + for (Iterator it = otherTagNames.iterator(); it.hasNext();) { equals &= getTagNames().contains(it.next()); } } Modified: trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java 2007-02-21 17:33:37 UTC (rev 1446) +++ trunk/jameleon-core/src/java/net/sf/jameleon/data/AbstractDataDrivableTag.java 2007-02-21 17:35:08 UTC (rev 1447) @@ -29,6 +29,7 @@ import net.sf.jameleon.JameleonTagSupport; import net.sf.jameleon.SessionTag; import net.sf.jameleon.TestCaseTag; +import net.sf.jameleon.bean.FunctionalPoint; import net.sf.jameleon.event.BreakPoint; import net.sf.jameleon.exception.JameleonScriptException; import net.sf.jameleon.result.DataDrivableResult; @@ -395,6 +396,9 @@ throw td; }catch(Throwable t){ setResultError(new JameleonScriptException(t)); + }finally{ + dataDrivableResult.setTag((FunctionalPoint) fp.clone()); + resetFunctionalPoint(); } } Modified: trunk/jameleon-core/src/java/net/sf/jameleon/function/FunctionTag.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/function/FunctionTag.java 2007-02-21 17:33:37 UTC (rev 1446) +++ trunk/jameleon-core/src/java/net/sf/jameleon/function/FunctionTag.java 2007-02-21 17:35:08 UTC (rev 1447) @@ -36,6 +36,7 @@ import net.sf.jameleon.Storable; import net.sf.jameleon.TestCaseTag; import net.sf.jameleon.bean.Attribute; +import net.sf.jameleon.bean.FunctionalPoint; import net.sf.jameleon.data.AbstractDataDrivableTag; import net.sf.jameleon.event.BreakPoint; import net.sf.jameleon.event.FunctionEventHandler; @@ -318,6 +319,7 @@ expectException = false; tearDown(); pluginTearDown(); + fResults.setTag((FunctionalPoint)fp.clone()); resetFunctionalPoint(); cleanUpEnvironment(); if (params != null) { Modified: trunk/jameleon-core/src/java/net/sf/jameleon/util/InstanceSerializer.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/util/InstanceSerializer.java 2007-02-21 17:33:37 UTC (rev 1446) +++ trunk/jameleon-core/src/java/net/sf/jameleon/util/InstanceSerializer.java 2007-02-21 17:35:08 UTC (rev 1447) @@ -21,8 +21,8 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; +import java.io.IOException; import java.io.InputStream; -import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/bean/AttributeTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/bean/AttributeTest.java 2007-02-21 17:33:37 UTC (rev 1446) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/bean/AttributeTest.java 2007-02-21 17:35:08 UTC (rev 1447) @@ -18,6 +18,9 @@ */ package net.sf.jameleon.bean; +import java.util.ArrayList; +import java.util.List; + import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; @@ -25,11 +28,13 @@ public class AttributeTest extends TestCase{ private Attribute attr = null; - private static String aName = "accountType"; - private static String cName = "contextName"; - private static String description = "The type of account to include in the query"; - private static String type = "alpha-numeric"; - private static boolean required = true; + private static final String A_NAME = "accountType"; + private static final String C_NAME = "contextName"; + private static final String D_VALUE = "defaultValue"; + private static final List VALUE = new ArrayList(); + private static final String DESCRIPTION = "The type of account to include in the query"; + private static final String TYPE = "alpha-numeric"; + private static final boolean REQUIRED = true; public AttributeTest( String name ) { super( name ); @@ -49,6 +54,22 @@ } //End JUnit Methods + public void testClone(){ + attr.setContextName(C_NAME); + attr.setDefaultValue(D_VALUE); + attr.setDescription(DESCRIPTION); + attr.setName(A_NAME); + attr.setRequired(REQUIRED); + attr.setType(TYPE); + VALUE.add("some value"); + attr.setValue(VALUE); + Attribute attr2 = (Attribute) attr.clone(); + String attrXml = attr.toXML(); + String attr2Xml = attr2.toXML(); + assertFalse("should be pointing to different references", attr == attr2); + assertEquals("attributes", attrXml, attr2Xml); + } + public void testAttributeConstructorDefault(){ assertNotNull("Name should be an empty non-null String",attr.getName()); assertNotNull("Description should be an empty non-null String",attr.getDescription()); @@ -60,50 +81,50 @@ } public void testAttributeSetName(){ - attr.setName(aName); - assertEquals("Name:", aName, attr.getName()); + attr.setName(A_NAME); + assertEquals("Name:", A_NAME, attr.getName()); } public void testAttributeSetDescription(){ - attr.setDescription(description); - assertEquals("Description:", description, attr.getDescription()); + attr.setDescription(DESCRIPTION); + assertEquals("Description:", DESCRIPTION, attr.getDescription()); } public void testAttributeSetType(){ - attr.setType(type); - assertEquals("Type:", type, attr.getType()); + attr.setType(TYPE); + assertEquals("Type:", TYPE, attr.getType()); } public void testAttributeSetRequired(){ - attr.setRequired(required); + attr.setRequired(REQUIRED); assertTrue("Required:",attr.isRequired()); } public void testAttributeSetContextName(){ - attr.setContextName(cName); - assertEquals("Context name", cName, attr.getContextName()); + attr.setContextName(C_NAME); + assertEquals("Context name", C_NAME, attr.getContextName()); } public void testAttributeToStringWithName(){ - attr.setName(aName); - attr.setRequired(required); - attr.setDescription(description); - assertEquals("toString() ", aName, attr.toString()); + attr.setName(A_NAME); + attr.setRequired(REQUIRED); + attr.setDescription(DESCRIPTION); + assertEquals("toString() ", A_NAME, attr.toString()); } public void testAttributeToStringWithContextName(){ - attr.setContextName(cName); - attr.setRequired(required); - attr.setDescription(description); - assertEquals("toString() ", cName, attr.toString()); + attr.setContextName(C_NAME); + attr.setRequired(REQUIRED); + attr.setDescription(DESCRIPTION); + assertEquals("toString() ", C_NAME, attr.toString()); } public void testAttributeToStringWithNameAndContextName(){ - attr.setName(aName); - attr.setContextName(cName); - attr.setRequired(required); - attr.setDescription(description); - assertEquals("toString() ", aName+" or "+cName, attr.toString()); + attr.setName(A_NAME); + attr.setContextName(C_NAME); + attr.setRequired(REQUIRED); + attr.setDescription(DESCRIPTION); + assertEquals("toString() ", A_NAME+" or "+C_NAME, attr.toString()); } public void testDefaultValue() { @@ -130,19 +151,19 @@ } public void testToXml() { - attr.setName(aName); - attr.setRequired(required); - attr.setDescription(description); - attr.setContextName(cName); + attr.setName(A_NAME); + attr.setRequired(REQUIRED); + attr.setDescription(DESCRIPTION); + attr.setContextName(C_NAME); attr.setValue(new String("george")); attr.setDefaultValue("smith"); String xml = attr.toXML(); - assertContains("Couldn't find name", "<attribute-name>" + aName + "</attribute-name>", xml); + assertContains("Couldn't find name", "<attribute-name>" + A_NAME + "</attribute-name>", xml); assertContains("Couldn't find name", "<attribute-instancevariable>" + false + "</attribute-instancevariable>", xml); - assertContains("Couldn't find description", "<attribute-description>" + description + "</attribute-description>", xml); + assertContains("Couldn't find description", "<attribute-description>" + DESCRIPTION + "</attribute-description>", xml); assertContains("Couldn't find type", "<attribute-type></attribute-type>", xml); - assertContains("Couldn't find required", "<attribute-required>" + required + "</attribute-required>", xml); - assertContains("Couldn't find field name", "<attribute-contextname>" + cName + "</attribute-contextname>", xml); + assertContains("Couldn't find required", "<attribute-required>" + REQUIRED + "</attribute-required>", xml); + assertContains("Couldn't find field name", "<attribute-contextname>" + C_NAME + "</attribute-contextname>", xml); assertContains("Couldn't find value", "<attribute-value>george</attribute-value>", xml); assertContains("Couldn't find default value", "<attribute-defaultvalue>smith</attribute-defaultvalue>", xml); } Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/bean/FunctionalPointTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/bean/FunctionalPointTest.java 2007-02-21 17:33:37 UTC (rev 1446) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/bean/FunctionalPointTest.java 2007-02-21 17:35:08 UTC (rev 1447) @@ -18,14 +18,14 @@ */ package net.sf.jameleon.bean; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; - -import java.util.HashMap; -import java.util.LinkedList; -import java.util.Map; - import net.sf.jameleon.exception.JameleonException; public class FunctionalPointTest extends TestCase{ @@ -71,6 +71,32 @@ fp2 = null; } + public void testClone(){ + List applications = new ArrayList(); + applications.add("app1"); + applications.add("app2"); + + fp2.getApplications().addAll(applications); + fp2.setClassName("some.class.name"); + fp2.setFunctionId("some function id"); + fp2.setShortDescription("short description"); + ArrayList steps = new ArrayList(); + steps.add("step1"); + steps.add("step2"); + steps.add("step3"); + fp2.setSteps(steps); + Map m = new HashMap(); + Attribute attr1 = new Attribute(); + attr1.setName("name1"); + Attribute attr2 = new Attribute(); + attr2.setName("name2"); + m.put("att1", attr1); + m.put("att2", attr2); + fp2.setAttributes(m); + FunctionalPoint fpC = (FunctionalPoint) fp2.clone(); + assertEquals("functional points", fp2.toXML(), fpC.toXML()); + } + public void testSetGetClassName(){ assertEquals("ClassName", "", fp2.getClassName()); fp2.setClassName(CLASS_NAME); @@ -144,7 +170,7 @@ public void testFunctionalPointSetSteps(){ fp = new FunctionalPoint(); - LinkedList steps = new LinkedList(); + ArrayList steps = new ArrayList(); steps.add(STEP1); steps.add(STEP2); fp.setSteps(steps); @@ -260,5 +286,5 @@ assertNotNull(msg + ": The string was null", actual); assertTrue(msg, actual.indexOf(expectedPattern) >= 0); } - + } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <se...@us...> - 2007-02-26 05:21:15
|
Revision: 1449 http://svn.sourceforge.net/jameleon/?rev=1449&view=rev Author: selie Date: 2007-02-25 21:21:12 -0800 (Sun, 25 Feb 2007) Log Message: ----------- Added getAllFailedLeafChildrenResults() Modified Paths: -------------- trunk/jameleon-core/src/java/net/sf/jameleon/result/HasChildResults.java trunk/jameleon-core/src/java/net/sf/jameleon/result/TestResultWithChildren.java trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestResultWithChildrenTest.java Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/HasChildResults.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/HasChildResults.java 2007-02-23 05:31:51 UTC (rev 1448) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/HasChildResults.java 2007-02-26 05:21:12 UTC (rev 1449) @@ -37,6 +37,12 @@ */ public List getAllChildrenResults(); /** + * Gets all the ancestor leaf children results that have failed + * + * @return List + */ + public List getAllFailedLeafChildrenResults(); + /** * Gets all the ancestor children results that can be counted as * test case results * Modified: trunk/jameleon-core/src/java/net/sf/jameleon/result/TestResultWithChildren.java =================================================================== --- trunk/jameleon-core/src/java/net/sf/jameleon/result/TestResultWithChildren.java 2007-02-23 05:31:51 UTC (rev 1448) +++ trunk/jameleon-core/src/java/net/sf/jameleon/result/TestResultWithChildren.java 2007-02-26 05:21:12 UTC (rev 1449) @@ -89,6 +89,24 @@ return allResults; } + /** + * Gets all the ancestor leaf children results that have failed + * + * @return List + */ + public List getAllFailedLeafChildrenResults(){ + List allFailedLeafResults = new ArrayList(); + List allResults = getAllChildrenResults(); + JameleonTestResult jtr; + for (Iterator it = allResults.iterator(); it.hasNext();) { + jtr = (JameleonTestResult)it.next(); + if (jtr.failed() && !jtr.isParent()) { + allFailedLeafResults.add(jtr); + } + } + return allFailedLeafResults; + } + public List getCountableResults(){ List countabeResults = new ArrayList(); Object obj; Modified: trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestResultWithChildrenTest.java =================================================================== --- trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestResultWithChildrenTest.java 2007-02-23 05:31:51 UTC (rev 1448) +++ trunk/jameleon-core/tst/java/net/sf/jameleon/result/TestResultWithChildrenTest.java 2007-02-26 05:21:12 UTC (rev 1449) @@ -106,6 +106,32 @@ assertEquals(5, trwc.getAllChildrenResults().size()); } + public void testGetAllFailedLeafChildrenResults(){ + TestResultWithChildren res = new MockTestResultWithChildren(tag, trwc); + TestResultWithChildren res2 = new MockTestResultWithChildren(tag, res); + FunctionResult res3 = new FunctionResult(); + FunctionResult res4 = new FunctionResult(); + res.setFailed(); + res2.setFailed(); + res4.setFailed(); + res2.addChildResult(res3); + res2.addChildResult(res4); + + assertEquals(1, res2.getAllFailedLeafChildrenResults().size()); + assertEquals(1, res.getAllFailedLeafChildrenResults().size()); + assertEquals(1, trwc.getAllFailedLeafChildrenResults().size()); + + assertSame(res4, res2.getAllFailedLeafChildrenResults().get(0)); + assertSame(res4, res.getAllFailedLeafChildrenResults().get(0)); + assertSame(res4, trwc.getAllFailedLeafChildrenResults().get(0)); + + res3.setFailed(); + assertEquals(2, res2.getAllFailedLeafChildrenResults().size()); + assertEquals(2, res.getAllFailedLeafChildrenResults().size()); + assertEquals(2, trwc.getAllFailedLeafChildrenResults().size()); + + } + public void testAddFailedResult(){ TestResultWithChildren res = new MockTestResultWithChildren(tag, trwc); TestResultWithChildren res2 = new MockTestResultWithChildren(tag, res); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |