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

Error when specifying xunit results file #637

Open
ColinWaddell opened this issue Aug 2, 2022 · 0 comments
Open

Error when specifying xunit results file #637

ColinWaddell opened this issue Aug 2, 2022 · 0 comments

Comments

@ColinWaddell
Copy link

ColinWaddell commented Aug 2, 2022

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!

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

1 participant