Comments (5)
Hi @dgkanatsios ,
Could you please run the tool with loglevel Verbose to see if we can get some more logs to understand what may be happening?
from dotnet-test-rerun.
thanks @ricardofslp for the response!
I modified the bash script to this and it works:
- task: Bash@3
continueOnError: true
displayName: 'Run functional tests with retries'
inputs:
failOnStderr: false
targetType: 'inline'
script: |
# https://github.com/joaoopereira/dotnet-test-rerun
dotnet tool install --global dotnet-test-rerun --version 1.8.0 --no-cache
project="$(Build.SourcesDirectory)/src/project.sln"
filter="(TestCategory=SomeCategory)"
# build the test solution
dotnet build $project
# run the tests
test-rerun $project --loglevel Verbose --no-build --results-directory $(Agent.TempDirectory) --settings "$(Build.SourcesDirectory)/src/test.runsettings" --logger trx --filter=$filter --inlineRunSettings '"TestRunParameters.Parameter(name=\"name\", value=\"value\")"'
I removed the verbosity from the dotnet test tool, maybe this is the culprit? Re-running it with changes now, will post back once I have a concrete answer. Thanks again for the great library!
from dotnet-test-rerun.
Not sure what's going on, but as soon as I add --verbosity detailed
the test doesn't do retries and the output is different.
FWIW, I am running the tool with a .sln file that references .csproj files from various test projects, not sure if/how this makes a difference.
Without --verbosity detailed
the output is what comes from the tool (this is --verbosity normal)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Results File: /mnt/vss/_work/_temp/_7550dd7ec000001_2023-12-05_05_08_28.trx
Passed! - Failed: 0, Passed: 5, Skipped: 0, Total: 5, Duration: 8 s
Test retries are done successfully here!
With --verbosity detailed
the output is similar to running dotnet test
Total tests: 287
Test Run Failed.
Passed: 248
Failed: 36
Skipped: 3
Total time: 22.2292 Minutes
6>VSTest:
MSB4181: The "Microsoft.TestPlatform.Build.Tasks.VSTestTask" task returned false but did not log an error.
Done executing task "Microsoft.TestPlatform.Build.Tasks.VSTestTask" -- FAILED.
6>Done building target "VSTest" in project "test.csproj" -- FAILED.
6>Done Building Project "/mnt/vss/_work/2/s/src/test.csproj" (VSTest target(s)) -- FAILED.
1>Done executing task "MSBuild" -- FAILED.
1>Done building target "VSTest" in project "test.sln" -- FAILED.
1>Done Building Project "/mnt/vss/_work/2/s/test.sln" (VSTest target(s)) -- FAILED.
Build FAILED.
0 Warning(s)
0 Error(s)
Time Elapsed 00:22:17.63
No test retries with this verbosity!
from dotnet-test-rerun.
Hi @dgkanatsios,
Regarding the way you are running should not make a difference.
It seems the issue could be related to the verbosity level.
If you run with other verbosity levels it also fails?
from dotnet-test-rerun.
hey @ricardofslp just edited my post to make it more visible, apologies for the confusion.
With --verbosity detailed
, tool doesn't do retries. With --verbosity normal
, retries work just fine. Not sure what's up with other verbosity levels.
from dotnet-test-rerun.
Related Issues (20)
- support all dotnet test available options
- Options [-e|--environment <NAME="VALUE">] is not supported HOT 3
- On Theory Failure all cases are being re-run HOT 5
- Provide the ability to run all test projects using a glob pattern HOT 1
- Feature: on re-run, search only the test projects/assemblies that contain the failed tests HOT 1
- Relative path to test assembly not found (on osx, linux specifically?) HOT 6
- enable the ability to run at root level, for whole solution HOT 4
- Tests aren't re-run if verbosity is set to normal HOT 5
- Missing option to override TestRunParameters HOT 9
- add option to specify a delay between test runs
- Runs entire suite on rerun instead of just failed tests in Azure DevOps pipeline HOT 2
- Support for DataTestMethods when filtering on rerun HOT 6
- Task ends in success when tests have failed HOT 9
- how to enable code coverage with release configuration setup HOT 8
- Feature request: Search for all Projects HOT 9
- Fully qualified name not used in re-run, tests executed across multiple unit test projects in the same solution HOT 9
- Test Reruns don't seem to be specific to framework version HOT 7
- Allow multiple logger arguments HOT 5
- Allow inline runsettings arguments HOT 16
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 dotnet-test-rerun.