Build/Test Issues

Can't covering the test method in VS2010?

Started by Ray on 9,281 views


hi, all, there is a problem in my pc.

I installed the Version 1.38b for VS2010. But it's not working in my VS2010.

When I using it, it always show the test method isn't covering.

I don't know why, anybody can help me ?

The code is following:

using NUnit.Framework;

namespace NCrunchTest
{
[TestFixture]
public class Test
{
[Test]
public void AddTest()
{
NCrunchTest test=new NCrunchTest();
int sum = test.Add(3, 4);
Assert.AreEqual(7, sum);
}
}
}
Hi Ray,

I'm wondering if you'd be able to answer some of the following questions - this will help me to better establish what is happening in your codebase.

- Does NCrunch run for any project/solution at all on your machine?
- Does the Tests Window list any tests at all? (make sure you don't have them ignored)
- If you go to the processing queue, do you see any errors against any of the tasks in the queue?
- When you describe the test method as not being covered, do you see any black circles next to the code?


Thanks!

Remco
Remco wrote:Hi Ray,

I'm wondering if you'd be able to answer some of the following questions - this will help me to better establish what is happening in your codebase.

- Does NCrunch run for any project/solution at all on your machine?
- Does the Tests Window list any tests at all? (make sure you don't have them ignored)
- If you go to the processing queue, do you see any errors against any of the tasks in the queue?
- When you describe the test method as not being covered, do you see any black circles next to the code?


Thanks!

Remco


Thanks for your answer, but the problem still trouble me.

- Does NCrunch run for any project/solution at all on your machine?
I using it in a simple test project.

- Does the Tests Window list any tests at all? (make sure you don't have them ignored)
The Tests Window has a tip: No tests are queued for execution. Monitoring no tests, with 1 test ignored.

- If you go to the processing queue, do you see any errors against any of the tasks in the queue?
Only has the Analyse Assembly and Build Assembly tasks, and the state are all Complete.

- When you describe the test method as not being covered, do you see any black circles next to the code?
Yes, there is a black circles at left of the line.

Looking forward to your reply.
Thanks,
Ray


Hi Ray -

Thanks for the feedback. It appears as though the problem is simply that you've ignored the test you're trying to execute with NCrunch. Most likely you took the default option during the startup wizard to 'Ignore all tests, I will choose which tests to run with NCrunch manually'.

In the Tests Window, click the grey circle with a line through it in order to show all the tests that you have ignored. Right click on the project showing and choose 'Unignore' from the context menu. The project with all of its tests should no longer be ignored by NCrunch and your test(s) should run.


Cheers,

Remco
Remco wrote:Hi Ray -

Thanks for the feedback. It appears as though the problem is simply that you've ignored the test you're trying to execute with NCrunch. Most likely you took the default option during the startup wizard to 'Ignore all tests, I will choose which tests to run with NCrunch manually'.

In the Tests Window, click the grey circle with a line through it in order to show all the tests that you have ignored. Right click on the project showing and choose 'Unignore' from the context menu. The project with all of its tests should no longer be ignored by NCrunch and your test(s) should run.


Cheers,

Remco



But I changed the Ignored Tests during the Run Configuration Wizard, I selected the "Let my test run- I will ignore them as a need to" option and I didn't find the grey circle and the "Unignore" from the context menu. The NCrunch always hints me there is no ignore test in project. And the circle in the left of line always black....
I don't know why....
Remco wrote:Hi Ray -

Thanks for the feedback. It appears as though the problem is simply that you've ignored the test you're trying to execute with NCrunch. Most likely you took the default option during the startup wizard to 'Ignore all tests, I will choose which tests to run with NCrunch manually'.

In the Tests Window, click the grey circle with a line through it in order to show all the tests that you have ignored. Right click on the project showing and choose 'Unignore' from the context menu. The project with all of its tests should no longer be ignored by NCrunch and your test(s) should run.


Cheers,

Remco



Oh, maybe I know the reason, I used the console application before, so the test method couldn't be covered, So I create a class library and copy the test class into it, the NCrunch is working.

Thank you very much.
Ray

Post a reply

Log in to reply.