xml test results not read by AppVeyor
I managed to build our project on AppVeyor. We use gtest to test our code with '--gtest_output=xml' argument, so xml output is created (Sample output xml attached).
I use this PS script:
$testpath = ".\Bin\x64\Debug\nfCommonTest.exe"
if(Test-Path $testpath)
{
$testpath
}
Start-Process $testpath --gtest_output=xml -wait
$wc = New-Object 'System.Net.WebClient'
if (Test-Path ".\test_detail.xml")
{
$tpath = ".\test_detail.xml"
$tpath
}
$wc.UploadFile("https://ci.appveyor.com/api/testresults/xunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path test_detail.xml))
to:
1. check if test exist, if so - print the path i checked
2. run this test with proper arg
3. check if xml output exists
4. upload it using script from Your Docs.
After script is printed, I get:
.\Bin\x64\Debug\nfCommonTest.exe
.\test_detail.xml
Packaging artifacts...OK
Build success
So that means both files were found...yet when I go to Tests tab
theres nothing there.Why is that?
- test_detail.xml 7.68 KB
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

Support Staff 1 Posted by Feodor Fitsner on 14 May, 2015 05:47 PM
Well, attached XML doesn't look like a valid
xunittest results.Example
xunitXML test results:Support Staff 2 Posted by Feodor Fitsner on 14 May, 2015 05:49 PM
Using PowerShell you can easily iterate over test results in XML and then push them using Build Worker API: http://www.appveyor.com/docs/build-worker-api#add-tests
3 Posted by Mkkulagowski on 14 May, 2015 06:54 PM
Well...we already have script in python doing so...yet I'd need to put some extra code using Build Worker API to send outputs to appveyor instead of console ;)
Too bad, but it's not hard to do so nvm.
Thanks for answers.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:56 AM.