Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I can see that it can be done from JUnit,
I would like to run it from ms test framework instead.
It is probably very similar.
thanks
Kenneth
There is no FitNesse runner for MSTest at this time. The biggest hurdle is that the FitNesse test engine is written in Java and was therefore easier to integrate with JUnit. To do the same with MSTest would require porting significant portions of Java code to .NET. If there is widespread demand for this, open source developers may be encouraged to work on it.
I am/was thinking that the easiest would be to write a unit test suite, containing a testmethod that starts fitness up as in another process. I.e. run it from command line and getting the result from the output file.
not a ver unit testing way, since it is slow. It sound more like an integration test.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I have written unit test for my .net core web-api project in specflow(mstest).Im able to run all the tests. Now I want check the code coverage. Some one please guide me to perform code coverage.
If you have Visual Studio Enterprise you can use the built in option to calculate code coverage:
You can also calculate code coverage from the command line.
Add the coverlet.msbuild package to your test project.
Run dotnet test --collect:"XPlat Code Coverage" on your test project
This will output an XML file coverage.cobertura.xml that contains the code coverage information.
You can then use the ReportGenerator .NET tool to create a visualization of your code coverage like this:
reportgenerator
-reports:"Path\To\TestProject\TestResults\{guid}\coverage.cobertura.xml"
-targetdir:"coveragereport"
-reporttypes:Html
For more details on these steps see Use code coverage for unit testing
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I am developing a C# application that involves communication with hardware devices such as an NFC reader and Spectrometer. We have the hardware already and I am not sure if it is still worth the time converting the hardware into mock classes. I am thinking of testing the software functions together with the hardware device.
Is there still any benefit conducting unit tests without hardware? Currently i do not have the interfaces for the different hardware classes. It would seem to require some work to properly configure the hardware interface classes.
I am using DLLImports for the hardware communication. I’m not sure if im able to simulate these dll calls using a fake class as well ?
Testing communication with the actual hardware device would become a Integration Testing but you are more inclined towards performing an Unit Test. I would say you just test the unit (method) that does communicate with the H/W piece and assert accordingly.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am writing unit test for developed code I am using Visual studio ultimate 2013 is there any method to generate unit test automatically.
There is no way to have fully automatically generated tests in a test suite, however there are some test suites like IntelliTest that can generate code for you if you provide a description on what to test and how to test it.
However it will just be very basic stubs/tests that gets generated for you and you will have to write the meaningful tests on your own. The computer has no knowledge on what you want to test, which edge cases that needs to get covered and how extensive the testing should be.
There is no way to generate unit test automatically. You have to write unit test for developed code.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
When I was on my industrial year as part of my degree, I ran our FV tests using JUnit inside of Ant (scheduled build system).
I am wondering:
Is this the "norm"?
Are there any other ways people run there tests?
Please note this is regarding how people in large teams within organisations (test engineers) run there tests.
Edit: I used eclipse with IBM RTC.
Thanks.
You should look at Continuous Integration (CI). With tools like Jenkins, Hudson, TeamCity, you check in your code, then at a build server, your code is tested and reported for coverage and test results etc.
Also before any deployment your tests should run and pass with some criteria you define.
You can have unit tests, acceptance tests, end to end test, all these can be automated at a build server.
For large/enterprise applications, you should definitely use CI.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I see that people have ask more specific questions, but mine is broad, why should one test any routes at all? where does the benefit of this really shine? Thanks!
PS currently doing this in .Net C# MVC 3
Just my 2¢ to a very subjective question:
Because by unit testing your routes, a single key combination (that will run the unit tests) allows you to verify whether they behave as expected in contrast to running through your entire application and manually testing them by wasting enormous time and by potenatially forgetting to manually test some of the edge cases. Also when some other developer inherits the code base and starts modifying it, it is much easier for him to run this same key combination (that runs the unit tests) and get instant feedback whether his modifications didn't have some impact on the existing functionality rather than manually going through the entire application and clicking through all the links and stuff.
And from practical point of view I use MvcContrib TestHelper to unit test my routes.