You're right, let me be clearer.
Since I use a BDD approach on my dev process, supported by cucumber as test tool, my test are somethink similar to this:
Feature: [#1234] Authentication
In order to access to the system
as system user
I want to be able to authenticate myself
Scenario: Successful Login
Given I am a registered user
And the system is up
When I point to http://myapp.com/login
Then I must see "Login form" on header
And I must see "Username" field
And I must see "Passwrod" field
And I must see "Submit" button
...
As you can see, I use the [#number] notation on Feature's description to link the feature with the relative issue on my issue tracking system (whatever it is, in my case not jira, but it is worthless).
I also have a job on Jenkins to perform a test validation on the whole project, let's call it testJob.
Of course, due to its purposes, this job:
- Compiles all the test classes (we are working on a Java project)
- Performs a `cucumber -f junit --out $WORKSPACE --jars lib --require target/test-classes features`
- Publish the tests' results (on testJob's config page, I've checked the "Publish JUnit test result report" checkbox)
The problem is that when I run this job, it execute with success, but on the test report page of the build (the link I found on "http://<my_jenkins_uri>/job/testJob/" named as "Latest Test Result", that points to "http://<my_jenkins_uri>/job/testJob/lastCompletedBuild/testReport/"), the table that shows all the test executed has all the link that contains the "#" char malformed.
To summarize:
- All my test are BDD
- I use the [#number] notation on feature description
- Cucumber formatter translates all those features'names into something like this:
<?xml version="1.0" encoding="UTF-8"?>
<testsuite errors="0" failures="0" name="[#1234] Authentication" skipped="0" tests="1" time="0.095000">
...
</testsuite>
during the formatting phase (`-f junit`, when I ran cucumber).
Given that, since the testsuite name is shown as "Package" value on that table and all the link on those name are REST and uses the name itself as resource id, I get all link on that table with href value written like this:
`<a href="[#1234] Authentication/">
<span style="">[#1234] Authentication</span>
</a>`
instead of like this:
as it should be.
`<a href="[%231234] Authentication/">
<span style="">[#1234] Authentication</span>
</a>`
Otherwise I get an HTTP 404 error when I click on the bad link...
Am I clear enough?
Andrea,
I get it's an url encoding issue, but I am having a hard time figuring out where you are facing this issue.
Can you describe the issue again with more specific example? what do you mean by test descriptions? which link for the test? column "package" on which table?
Thanks!