# CTest - generate xml file results

**URL:** https://discourse.cmake.org/t/ctest-generate-xml-file-results/5133
**Category:** Usage
**Created:** [February 28, 2022, 3:05pm UTC](https://discourse.cmake.org/t/ctest-generate-xml-file-results/5133 "2022-02-28T15:05:49Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![yonatanbk](https://discourse.cmake.org/user_avatar/discourse.cmake.org/yonatanbk/32/2232_2.png) [@yonatanbk](https://discourse.cmake.org/u/yonatanbk)
#### Post date: [February 28, 2022, 3:05pm UTC](https://discourse.cmake.org/t/ctest-generate-xml-file-results/5133/1 "2022-02-28T15:05:50Z")

</div>

Hi,  
I have a test preset named ‘tests-windows’ and I run `ctest --preset tests-windows` in order to run my tests. Now I want to generate .xml file with the tests result. I saw people are running `ctest -T test` in order to generate the xml file but I guess I can’t use it with test preset. I saw “–output-junit” option in the docs but it’s not part of `buildPresets` scheme so I can’t use it neither.  
So my question is how can I generate xml file of my tests result (my cmake version is 3.20)?  
Thanks

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [February 28, 2022, 3:28pm UTC](https://discourse.cmake.org/t/ctest-generate-xml-file-results/5133/2 "2022-02-28T15:28:39Z")

</div>

Cc: @zackgalbreath @kyle.edwards

---

<div class="post-metadata">

### Author: ![yonatanbk](https://discourse.cmake.org/user_avatar/discourse.cmake.org/yonatanbk/32/2232_2.png) [@yonatanbk](https://discourse.cmake.org/u/yonatanbk)
#### Post date: [March 3, 2022, 8:10am UTC](https://discourse.cmake.org/t/ctest-generate-xml-file-results/5133/3 "2022-03-03T08:10:34Z")

</div>

bump 🙂

---

<div class="post-metadata">

### Author: ![yonatanbk](https://discourse.cmake.org/user_avatar/discourse.cmake.org/yonatanbk/32/2232_2.png) [@yonatanbk](https://discourse.cmake.org/u/yonatanbk)
#### Post date: [March 24, 2022, 1:29pm UTC](https://discourse.cmake.org/t/ctest-generate-xml-file-results/5133/4 "2022-03-24T13:29:53Z")

</div>

any update?
