# Is it correct that shelved unit tests count as negative?

**URL:** https://www.finalbuilder.com/forums/t/is-it-correct-that-shelved-unit-tests-count-as-negative/5412
**Category:** Discussion
**Created:** [September 21, 2015, 9:37am UTC](https://www.finalbuilder.com/forums/t/is-it-correct-that-shelved-unit-tests-count-as-negative/5412 "2015-09-21T09:37:49Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![christian.leh](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@christian.leh](https://www.finalbuilder.com/forums/u/christian.leh)
#### Post date: [September 21, 2015, 9:37am UTC](https://www.finalbuilder.com/forums/t/is-it-correct-that-shelved-unit-tests-count-as-negative/5412/1 "2015-09-21T09:37:49Z")

</div>

Just to be sure 🙂

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [September 21, 2015, 9:45am UTC](https://www.finalbuilder.com/forums/t/is-it-correct-that-shelved-unit-tests-count-as-negative/5412/2 "2015-09-21T09:45:38Z")

</div>

The only thing Shelving a unit test does, is stop it from failing a build if the unit test fails or errors. Not sure what you mean by negative?

---

<div class="post-metadata">

### Author: ![christian.leh](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@christian.leh](https://www.finalbuilder.com/forums/u/christian.leh)
#### Post date: [September 21, 2015, 9:52am UTC](https://www.finalbuilder.com/forums/t/is-it-correct-that-shelved-unit-tests-count-as-negative/5412/3 "2015-09-21T09:52:44Z")

</div>

we shelved 13 unit tests and the stage gate failed because it was checking for “= 0”.   
 hovering over the build item (colored version number) it shows “-13” unit tests in red.   
  
 so we changed “= 0” to “\<= 0” in the stage gate, so we can continue. Now we are not sure if this is a wanted behavior or not

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [September 21, 2015, 10:13am UTC](https://www.finalbuilder.com/forums/t/is-it-correct-that-shelved-unit-tests-count-as-negative/5412/4 "2015-09-21T10:13:30Z")

</div>

No - that does seem to be right. Which heading is the negative number under? What numbers are you seeing on the Unit Tests tab of the Build view for each heading e.g. total, passed, failed, new failures, errors, not run, skipped. Which unit test runner are you using? Which Continua version are you running?

---

<div class="post-metadata">

### Author: ![christian.leh](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@christian.leh](https://www.finalbuilder.com/forums/u/christian.leh)
#### Post date: [September 21, 2015, 10:23am UTC](https://www.finalbuilder.com/forums/t/is-it-correct-that-shelved-unit-tests-count-as-negative/5412/5 "2015-09-21T10:23:41Z")

</div>

![]()   
  
 we are running 1.7.0.108 and we use MsTest 2010.

---

<div class="post-metadata">

### Author: ![christian.leh](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@christian.leh](https://www.finalbuilder.com/forums/u/christian.leh)
#### Post date: [September 21, 2015, 10:24am UTC](https://www.finalbuilder.com/forums/t/is-it-correct-that-shelved-unit-tests-count-as-negative/5412/6 "2015-09-21T10:24:16Z")

</div>

hm, image thing does not work … [http://ibin.co/2GOOths8L66o](http://ibin.co/2GOOths8L66o)

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [September 21, 2015, 11:12am UTC](https://www.finalbuilder.com/forums/t/is-it-correct-that-shelved-unit-tests-count-as-negative/5412/7 "2015-09-21T11:12:02Z")

</div>

That’s definitely not right, however I’m not getting the same result. Can you send us a copy of the \*.trx file output from MSTest and I’ll do some more investigation tomorrow.

---

<div class="post-metadata">

### Author: ![christian.leh](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@christian.leh](https://www.finalbuilder.com/forums/u/christian.leh)
#### Post date: [September 23, 2015, 11:40am UTC](https://www.finalbuilder.com/forums/t/is-it-correct-that-shelved-unit-tests-count-as-negative/5412/8 "2015-09-23T11:40:54Z")

</div>

need to configure out build server first to keep the trx file. However, these shelved tests additionally fail (so we shelved them for now). Maybe thats the trick to reproduce it.

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [September 24, 2015, 2:19am UTC](https://www.finalbuilder.com/forums/t/is-it-correct-that-shelved-unit-tests-count-as-negative/5412/9 "2015-09-24T02:19:46Z")

</div>

Hi Christian  
  
Our &nbsp;test includes shelved tests which fail but we don’t get the same results.  
  
You can register the trx file as an artifact.   
  
Add

`  ``/ < /.trx `

  
to the Workspace Rules,&nbsp;and&nbsp;  
  

`.trx`

  
to the Artifact Rules
