Skip to content

Error when specifying xunit results file #637

@ColinWaddell

Description

@ColinWaddell

Hi,

I'm attempting to use Pickles to generate documentation based on my feature files and the xml results outputted by Ceedling, which is in xUnit format.

I see the following when running pickles:

pickles -f=/home/mrcolin/ccs_workspace_v11/project-name/requirements/features -o=/home/mrcolin/ccs_workspace_v11/project-name/requirements/docs --lr=/home/mrcolin/ccs_workspace_v11/project-name/build/artifacts/test/report.xml --trfmt=xunit --sn=SpaceForgeAvionics --sv=EQM --df=html 

Pickles v.0.0.0.0
 
Generating documentation based on the following parameters 
---------------------------------------------------------- 
Feature Directory              : /home/mrcolin/ccs_workspace_v11/project-name/requirements/features 
Output Directory               : /home/mrcolin/ccs_workspace_v11/project-name/requirements/docs 
Project Name                   : ProjectName 
Project Version                : v1 
Language                       : en 
Incorporate Test Results?      : Yes 
Include Experimental Features? : No 
Exclude Tag                    :  
Technical Tag                  :  
Test Result Format             : XUnit 
Test Result File               : /home/mrcolin/ccs_workspace_v11/project-name/build/artifacts/test/report.xml 
Pickles did not complete successfully Object reference not set to an instance of an object.

Here's the contents of the feature file:

Feature: Serial interface for interfacing with flight avionics

    Scenario: User sends valid command
        Given a stable communications channel
        When a valid command is sent
        Then the device will return a valid message

    Scenario: User sends a command with a bad CRC
        Given a stable communications channel
        When a command with a bad CRC is sent
        Then the device will report an RESPONSE_INVALID_CHECKSUM message

    Scenario: User sends a command with more data than specified in length field
        Given a stable communications channel
        When a user sends a command which is longer than the data length field
        Then the device will respond with an RESPONSE_COMMAND_INCORRECT message

    Scenario: User starts sending a command but doesn't complete transmitting
        Given a stable communications channel
        When a user starts sending a command
        But stops sending before full command is sent
        Then device will respond with a RESPONSE_COMMAND_TIMEOUT
        And device will return to a state where a new command can be recieved

And here's the contents of the report.xml:

<?xml version='1.0' encoding='utf-8' ?>
<TestRun>
	<FailedTests>
		<Test id="1">
			<Name>test/test_SerialInterface.c::test_SerialInterface_ValidCommand</Name>
			<FailureType>Assertion</FailureType>
			<Location>
				<File>test/test_SerialInterface.c</File>
				<Line>35</Line>
			</Location>
			<Message>Expression Evaluated To FALSE</Message>
		</Test>
	</FailedTests>
	<SuccessfulTests>
		<Test id="2">
			<Name>test/test_SerialInterface.c::test_SerialInterface_InvalidCommand</Name>
		</Test>
	</SuccessfulTests>
	<IgnoredTests/>
	<Statistics>
		<Tests>2</Tests>
		<Ignores>0</Ignores>
		<FailuresTotal>1</FailuresTotal>
		<Errors>0</Errors>
		<Failures>1</Failures>
	</Statistics>
</TestRun>

A separate question I'm happy to make another issue for, but might as well ask here, is: how do I get the name of tests to align with the feature/scenario I'm testing against?

Many thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions