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

Wildcard support for test result files #421

Closed
wants to merge 10 commits into from
Closed

Wildcard support for test result files #421

wants to merge 10 commits into from

Conversation

Autom8edChaos
Copy link

@Autom8edChaos Autom8edChaos commented Feb 2, 2017

Wildcards can be used for testresult files like:
C:\results*.trx
or
C:\runs\Acceptance*.xml;C:\dev\unit*.xml

Works in combination with semicolon.
Multiple files are selected as wildcard matches more than one files.

All tests pass, new tests added.
Commandline use tested in the wild.

Code is implemented for commandline, powershell, msbuild and for future use in UI*. All other behaviour in these configs is kept the same (like: semicolon use is only implemented for commandline).

* UI does a check on the existing of the file before the GENERATE button becomes enabled. This does not work wild wild cards.

Known Limitations:

  • does not work when path is empty
  • unknown if relative paths are supported
  • breaks when path does not exist

Above limited behaviour is not described or tested in the master version, please advice.

dirkrombauts and others added 2 commits January 26, 2017 18:54
* Fixes hiding topnav when printing. (#411)

* Adding Cucumber JSON Documentation Builder (#413)

* Adding Cucumber JSON as possible export format

* Version

* fixing the tests

* Fixing unit tests

* Separated Cucumber Documentation as separate project

* Fixing Build Pipeline

* Adding missed build dependency steps

* resolved the namespace issues that was preventing the build from completing successfully

* Addressing code review comments

* adding cucumber output format

* Release 2.12.0 (#416)

* Adding entries to change log

* Bump version (2.12.0)

* Version 2.12.0
@dirkrombauts
Copy link
Member

Thank you for your contribution!

Would you be willing to expand your work - for example I would be grateful if you could address the limitations that you discovered in the existing code.

Also: as you discovered the usage of semicolons isn't uniform. It would be great if you could make this more general.

@Autom8edChaos
Copy link
Author

I can look into it and create testcases for relative and UNC paths. Difficulty is that I experienced the filesystem mock a bit limited to do this, but maybe I have not read enough into it. Otherwise I need to setup some tests on a real filesystem, but can be brittle on other users system because different setups.

Questions:

  • What should be the behaviour when a path is empty or does not exist: Gracefully exit with message, throw exception or silently go on without using that/a resultfile?
  • Semicolon limitations is what I thought was by design, but it should be easy to implement. Just implement it?

I'll take a look into the UI behaviour for feasibility.

@dirkrombauts
Copy link
Member

Hi,

  • Exit behaviour: to be hones I'm not sure how Pickles behaves right now if you supply one result file and it doesn't exist. I think the optimal behaviour would be to exit with an error code and a message.
  • Semicolons: I'm not sure how to provide multiple result files in the MSBuild runner. That's why I didn't implement it yet. Do you have any ideas? Providing them in the GUI isn't too difficult in principle but it involves adding a listbox, and ways to edit the content of the listbox.

…mandLine, UI-api).

Folders and no match will deliver no result file.
Multiple matches on the same file will distinct into a single result.
@Autom8edChaos
Copy link
Author

Improved the handling of wildcard support and semicolons by adding them to the MSBuild and UI parts. The UI still needs a solution on the front end, but it is already implemented on the back end.

When there are multiple matches on the same file (like C:\foo*.trx;C:*bar.trx matches twice on C:\foobar.trx) it is rendered into a single match.

When there are no matches, no error is thrown in the file-collection functions. This is the same behaviour as before.

Unfortunately, I checked in too many files (some config and test result files), is there a way you can ignore this?

@dirkrombauts
Copy link
Member

Thanks for your continuing efforts.

About the files. There's some merge conflict on the build server ... I think the best thing would be for you to rebase on develop and reapply your changes ...

Bas M. Dam and others added 7 commits February 16, 2017 15:09
…mandLine, UI-api).

Folders and no match will deliver no result file.
Multiple matches on the same file will distinct into a single result.

This commit does not include the changed trx files that made the merge difficult
…mandLine, UI-api).

Folders and no match will deliver no result file.
Multiple matches on the same file will distinct into a single result.

Attempt 3
…ild, CommandLine, UI-api)."

This reverts commit 1dc1861.
…mandLine, UI-api).

Folders and no match will deliver no result file.
Multiple matches on the same file will distinct into a single result.

This commit does not include the changed trx files that made the merge difficult
@Autom8edChaos
Copy link
Author

Closing this request, I am messing up with my GitHub settings. Will do a new pull request.

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

Successfully merging this pull request may close these issues.

None yet

2 participants