Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for a framework to help automate my integration tests. C# / VS2013.
The requirements are basically exactly the same as for a unit testing framework, except that I need to be able to specify the order that tests are executed in, because the tests are affecting a database (which is wiped at the start of the test and is always in a deterministic state throughout the tests) and gradually building up a very large number of products and other items which all interact with each other.
I'm currently using MbUnit / Gallio, but it seems like they've ceased development and can't launch VS2013 to debug. Is there anything else out there?
And I'm saddened by having to add this, but what I DO NOT NEED is people telling me how unit tests ought to be independent and mock the database layer. I've got unit tests, thanks. They don't give me enough coverage of some of the interactions I need to test, which is why I am automating integration testing in addition.
Visual Studio's unit test framework (mstest) has "Ordered Test" that will allow you to specify test execution order.
You can run tests in an order from command line through /testcontainer:test.dll /test:test1 /test:test2 /test:test3. Moreover the tests will run on alphabetical order.
maybe this links help ordered execution of tests in visual studio
There is also a design pattern described by martin fowler Gateway
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I'm working as a "code reviewer" on a project.
It's a C# application, Visual Studio 2019, and I would like to know what methods are not covered by an Unit Test, but without check them one-by-one.
There is a way to list or discover all methods (or, at least, the public ones) that are not coved by an Unit Test?
You can use the Code Coverage Results panel, inside visual studio.
Here you can see my results.
Which shows everything! Even how much coverage each method has.
Take a look at my screenshot.
There are different tools which can help you cover code coverage for .Net.
Jetbrains dotCover is one such tool. It can integrate with Resharper unit test runner and can show which tests cover which code.
Additional info is available here: http://blogs.jetbrains.com/dotnet/2010/07/show-covering-test-with-dotcover/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Over the next two years we will be building a large Angular 2 application. Part of the test suite will be User Interface Tests. The Unit Tests and Integration tests will be written in C# with NUnit or MSTest. The client has chosen Selenium for the User Interface Tests. Is it possible to write tests for Selenium in C# that can test the Angular 2 User Interface or will Protractor need to be used? I would like to have all the tests run during a Team City build. Can Protractor be run in Team City? If so what does the setup of Protractor look like in Team City?
You can use whatever you like, but Protractor is preferred way since it has builtin Angular 2 support.
There are couple of useful reporting plugins (they provide TeamCity compatible output i.e. you will see failing test names and total number of tests): karma-teamcity-reporter for pure Jasmine tests and TeamCityReporter from jasmine-reporters for Protractor tests.
Both Protractor and Jasmine tests can be run in TeamCity.
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 does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Hi friends,
I want to use NBehave with Visual studio unit testing frame work. I have tried to dig into many links but most of them explains NBehave with MBUnit.
Can any one help me to find any resources to use NBehave with VS Test?
I used to really like nbehave and I think it is a great product but it has one simple flaw. It has a custom test runner and therefore nothing else integrates with it as easily as the more common used frameworks.
As #Fresh points out in the comments, SpecFlow is the far more commonly used framework for plain text specification testing on DotNet. I've chosen to use it on my most recent projects because you just use the nUnit or mstest test runner of your choice, which means instant integration with tools such as ReSharper, TeamCity, dotcover, nDepend, and of course the integrated test runner in Vs2012 and later.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I need to start using unit tests in my code . The problem is that i never written unit tests . Can you please recommend me some good sites and book how to write correctly unit tests and to use nunit application .
Thanks a lot for help.
I would recommend you get The Art of Unit Testing by Roy Osherove
I think Pragmatic Unit Testing is a good complementary book for Osherove's Art of Unit Testing. Pragmatic unit testing deals with flushing out errors and different types of targeted testing, whereas Roy's book is a higher level and more general book that deals with a wider range of concepts.
As a beginner, I found the Pragmatic book an excellent starting point.
Here are some other quality resources:
Misko's guide to writing testable code. One of the main battles when writing tests is ... how to structure code to make it testable. Misko's guides are invaluable.
Roy Osherove's cranky test review videos. The second battle we face is writing good, clear, maintainable tests. It's really easy to write bad/brittle/unmaintainable tests, so it is important to be aware of common mistakes. These videos can be a bit cranky at times, but they're full of good tips.
It may be a little dated, but the one I started with was Test Driven Development In Microsoft.NET.