Comments (8)
Hi thanks for reporting,
@diegosainz please could you help us?
from fastest.
Sure, I'm out of the city but as soon as I get back (next week) will look
into it.
On Nov 27, 2014 2:24 AM, "Giulio De Donato" [email protected]
wrote:
Hi thanks for reporting,
@diegosainz https://github.com/diegosainz please could you help us?—
Reply to this email directly or view it on GitHub
#20 (comment).
from fastest.
I think I may have come across this same issue with JUnit log files, but it has to do more with how the Behat JUnitFormatter generates the log file path in its beforeFeature() method, not necessarily what fastest is doing (other than parallel processing). Essentially, you need to provide a unique directory path to the --out
parameter. Otherwise, multiple parallel tests will output to the exact same file path for an individual feature file and overwrite each others content (in the examples you pasted and the ones that I've seen that are similar, the content was not overwritten completely).
The exact command I use is this:
#!/bin/sh -x
mkdir -p app/build/behat_report;
mkdir -p app/build/logs/junit/parallel;
mkdir -p app/build/logs/coverage;
bin/behat --list-scenarios -p continuous_integration src | \
bin/fastest \
-vvv \
--preserve-order \
--rerun-failed \
'php app/console doctrine:database:drop --env=test --force; \
php app/console doctrine:database:create --env=test; \
php app/console doctrine:schema:update --env=test --force; \
feature_name=`echo $ENV_TEST_ARGUMENT | sed 's/[\/\.\:]/_/g'`;
BEHAT_PARAMS="extensions[VIPSoft\\CodeCoverageExtension\\Extension][report][options][target]=app/build/logs/coverage/behat_parallel_${feature_name}.cov" \
bin/behat \
--format="progress,junit,html" \
--out="null,app/build/logs/junit/parallel/${feature_name},app/build/behat_report/behat_report_parallel_${feature_name}.html" \
-p continuous_integration \
{} \
;' \
;
The key part here is the feature_name
variable. It takes the ENV_TEST_ARGUMENT
value, which should include the entire feature file path plus the line number of the scenario, and changes slashes, periods, and colons to underscores. This provides a unique enough value for the feature file and the specific scenario that is being executed which could be used as a directory name.
So to adapt to your specific command, I might try something like this:
./bin/behat -c app/config/behat.yml "@AppWebBundle" --list-scenarios |
./bin/fastest --verbose --preserve-order
"feature_name=`echo $ENV_TEST_ARGUMENT | sed 's/[\/\.\:]/_/g'`; ./bin/behat --format=junit --out=build/logs/behat/${feature_name} -c app/config/behat.yml -v {};
Then in your Jenkins configuration, you could change the JUnit report path to something like build/logs/behat/**/*.xml
so that it can account for the new sub-directories and find the generated JUnIt *.xml files.
from fastest.
@wcluijt
Thanks, i will try it.
from fastest.
@wcluijt excellent post - @kristijanhusak is this still an issue so I can look into it?
from fastest.
@liuggio I think this issue can be closed as resolved - we have been running tests this way for a while now and Jenkins seems to work OK with the junit output.
from fastest.
I haven't tested @wcluijt solution, stayed with the testing by feature. IF @diegosainz says it is working, it can be closed.
from fastest.
thanks
from fastest.
Related Issues (20)
- support of PHP 7.3 HOT 7
- Test names are not aligned with -vv when some tests take minutes and other seconds HOT 4
- Behat tests never end HOT 10
- use input list in inverse mode HOT 5
- generating the list of tests from a PHPUnit XML file ignores the <groups> tag
- Always a false positive HOT 1
- symfony 5 HOT 5
- Incompatible with laravel HOT 3
- before option not working anymore HOT 10
- How to run two commands before tests? HOT 1
- Not compatible with PHPUnit 9+ HOT 2
- Switch to GitHub actions
- Add support for MongoDB official client HOT 4
- Failure on several issues HOT 4
- Latest Symfony Process make fastest screaming with PHP Warning: Array to string conversion HOT 19
- Symfony 5.4 phpunit 9.5 with forceCoversAnnotation and beStrictAboutCoversAnnotation giving random failures HOT 2
- Support for DATABASE_URL HOT 8
- Question about database isolation HOT 3
- Update symfony dependencies to ^6.0 HOT 5
- Couldn't make it run with WordPress HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastest.