Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reporter settings does not work #76

Open
lasseahvenainen opened this issue Nov 5, 2024 · 2 comments
Open

Reporter settings does not work #76

lasseahvenainen opened this issue Nov 5, 2024 · 2 comments

Comments

@lasseahvenainen
Copy link

The settings for reporters does nothing, below is the settings used in pom.xml

<reporters>
 	<reporter>
 	<name>ut_coverage_html_reporter</name>
 	<fileOutput>testoutput.html</fileOutput>
 	<consoleOutput>true</consoleOutput>
 	</reporter>
 </reporters>

No file is created and no error message is seen.
When debugging it is clear that the parameter

@Parameter
  final List<ReporterParameter> reporters = new ArrayList<>();

in class UtPlsqlMojo is empty

@jgebal
Copy link
Member

jgebal commented Nov 5, 2024

Hi
Please provide full pom xml section of utplsql configuration from the pom root.

Are the other settings working fine?
Please also provide the version of:

  • java
  • maven
  • utplsql-maven-plugin
  • utplsql framework on the database

The reporters configuration was tested thoroughly so I assume it is something related to your specific settings or configuration.

@lasseahvenainen
Copy link
Author

Thanks for the quick response:

My versions is:

java version "21.0.4" 2024-07-16 LTS
Apache Maven 3.9.5
utplsql-maven-plugin 3.1.11
utlplsql v3.1.14-develop

<plugin>
				<groupId>org.utplsql</groupId>
				<artifactId>utplsql-maven-plugin</artifactId>
				<version>3.1.11</version>
				<executions>
					<execution>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<!-- REQUIRED PARAMETERS -->

							<!-- A list of tests suite paths. -->

							<!-- The path(s) can be in one of the following formats: -->
							<!--     schema[.package[.procedure]] -->
							<!--     schema:suite[.suite[.suite][...]][.procedure] -->
							<!-- Both formats can be mixed in the list. -->
							<!-- If only schema is provided, then all suites -->
							<!-- owned by that schema are executed. -->
							<paths>
								<path>loggbas</path>
							</paths>

							<sources>
								<source>
									<!-- Path to project source files. -->
									<directory>changelog</directory>
									<!-- File patterns to include. -->
									<includes>
										<include>**/*sql</include>
										<include>**/*pkb</include>
										<include>**/*pks</include>
									</includes>
								</source>
							</sources>

							<tests>
								<test>
									<!-- Path to project test files. -->
									<directory>changelog/Test</directory>
									<!-- File patterns to include. -->
									<includes>
										<include>**/*pks</include>
										<include>**/*pkb</include>
									</includes>
								</test>
							</tests>

							<!-- OPTIONAL PARAMETERS -->

							<!-- Continue in case of failure. -->
							<!-- Defaults to: ${maven.test.failure.ignore} -->
							<ignoreFailure>false</ignoreFailure>

							<!-- Skip the utPLSQL version compatibility check. -->
							<!-- Defaults to: false -->
							<skipCompatibilityCheck>false</skipCompatibilityCheck>

							<!-- Skip the tests -->
							<!-- Defaults to: false -->
							<skipUtplsqlTests>false</skipUtplsqlTests>

							<!-- Enables DBMS_OUTPUT -->
							<!-- Defaults to: false -->
							<dbmsOutput>true</dbmsOutput>

							<!-- Sets a timeout around Reporter creation and retries when not ready after a while. -->
							<!-- 0 = no timeout. -->
							<oraStuckTimeout>0</oraStuckTimeout>

							<!-- A list of tags to run. -->
<!--							<tags>-->
<!--								<tag>test_tag</tag>-->
<!--							</tags>-->

							<!-- Enables random order of test executions. -->
							<randomTestOrder>true</randomTestOrder>
							<!-- Sets the seed to use for random test execution order. If set, it sets -random to true. -->
							<randomTestOrderSeed>5</randomTestOrderSeed>

							<!-- Comma-separated object list to include in the coverage report. -->
							<!-- Format: [schema.]package[,[schema.]package ...]. -->
							<!-- See coverage reporting options in framework documentation. -->
							<includeObject>loggbas</includeObject>

							<!-- Comma-separated object list to exclude from the coverage report. -->
							<!-- Format: [schema.]package[,[schema.]package ...]. -->
							<!-- See coverage reporting options in framework documentation. -->
							<!--<excludeObject>app.test1</excludeObject>-->

							<!-- Regular expression to match against schema name to include in coverage -->
<!--							<includeSchemaExpr>app.test1,app.test2</includeSchemaExpr>-->

							<!-- Regular expression to match against schema name to exclude in coverage -->
<!--							<excludeSchemaExpr>app.test1,app.test2</excludeSchemaExpr>-->

							<!-- Regular expression to match against schema name to include in coverage -->
<!--							<includeObjectExpr>app.test1,app.test2</includeObjectExpr>-->

							<!-- Regular expression to match against object name to exclude in coverage -->
<!--							<excludeObjectExpr>app.test1,app.test2</excludeObjectExpr>-->

							<!-- List of reporters. -->
							<!-- You can pass the name of the reporter and/or the output file -->
							<!-- of the reporter and/or if the report is logged to the console. -->
							<!-- If you don't pass any reporter, UT_DOCUMENTATION_REPORTER will be used. -->
							<!-- This is a current list of the names of the reporters, -->
							<!-- see UtPLSQL documentation in order to check the final list: -->
							<!--     UT_DOCUMENTATION_REPORTER -->
							<!--     UT_COVERAGE_HTML_REPORTER -->
							<!--     UT_TEAMCITY_REPORTER -->
							<!--     UT_XUNIT_REPORTER -->
							<!--     UT_COVERALLS_REPORTER -->
							<!--     UT_COVERAGE_SONAR_REPORTER -->
							<!--     UT_SONAR_TEST_REPORTER -->
							<reporters>
								<reporter>
									<name>ut_coverage_html_reporter</name>
									<!-- The file output path. -->
									<fileOutput>testoutput.html</fileOutput>
									<!-- Indicates if should write to console. -->
									<consoleOutput>true</consoleOutput>
								</reporter>
							</reporters>

							<!-- Custom source code mapping options. -->
							<!-- See coverage reporting options in framework documentation. -->
							<sourcesOwner>loggbas</sourcesOwner>
							<sourcesRegexExpression>.*/\w+/(\w+)/(\w+)\.\w{3}</sourcesRegexExpression>
							<sourcesOwnerSubexpression>app</sourcesOwnerSubexpression>
							<sourcesNameSubexpression>2</sourcesNameSubexpression>
							<sourcesTypeSubexpression>1</sourcesTypeSubexpression>
							<sourcesCustomTypeMapping>
								<customTypeMapping>
									<type>package body</type>
									<customMapping>package_bodies</customMapping>
								</customTypeMapping>
							</sourcesCustomTypeMapping>

							<!-- Custom test code mapping options. -->
							<!-- See coverage reporting options in framework documentation. -->
							<testsOwner>tests_owner</testsOwner>
							<testsRegexExpression>.*/\w+/(\w+)/(\w+)\.\w{3}</testsRegexExpression>
							<testsOwnerSubexpression>test</testsOwnerSubexpression>
							<testsNameSubexpression>2</testsNameSubexpression>
							<testsTypeSubexpression>1</testsTypeSubexpression>
							<testsCustomTypeMapping>
								<customTypeMapping>
									<type>package body</type>
									<customMapping>package_bodies</customMapping>
								</customTypeMapping>
							</testsCustomTypeMapping>
						</configuration>
					</execution>
				</executions>
			</plugin>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants