I have the following method in my unit test project:
[TestMethod]
[HostType("ASP.NET")]
[UrlToTest("http://localhost:3418/Web/SysCoord/ChooseEPA.aspx")]
[AspNetDevelopmentServerHost("%PathToWebRoot%")]
public void TestMethod1()
{
Page page = TestContext.RequestedPage;
Assert.IsTrue(false, "Test ra...
Visual Studio 2008 has built-in unittesting that was previously only available in the Team Suite editions. What unittesting framework is this based on? MbUint, MStest, xUnit or something completely different?
...
There are quite a lot of unittesting frameworks out there for .NET. I found this little feature comparison: http://www.codeplex.com/xunit/Wiki/View.aspx?title=Comparisons
Now I am to choose the best one for us. But how? Does it matter? Which one is most future proof and has a decent momentum behind it? Should I care about the features? ...
[Of course, the question is not restricted to a specific "friend" implementation, feel free though to point out implementation specifics if relevant]
Reading through the unanswered questions, I stumbled upon the InternalsVisibleTo attribute:
Specifies that types that are
ordinarily visible only within the
current assembly are vi...
Does MSTest have standalone GUI similar to nUnit that lets me use it and run test without visual studio? What is the official site for MSTest where I can learn more about how to use it?
...
JsUnit provides an ant-script with the target 'standalone_test'. This target uses the property url to identify the HTML-site, that executes the tests. These site is checked in, so that everyone should be able after a checkout to execute this tests. This works, but the url-proprty must be set to an absolute path, like file:///home/user/pr...
If you (or your organization) aspires to thoroughly unit test your code, how do you measure the success or quality of your efforts?
Do you use code coverage, what percentage do you aim for?
Do you find that philosophies like TDD have a better impact than metrics?
...
I am looking for any and all suggestions of the best and effective resources that the StackOverflow community has used to better learn MSBuild with an emphasis on integrating unit tests and later static code analysis tools such as FxCop and StyleCop into the build process.
I have tried to find good clear documentation on adding unit tes...
i.e. as I compose my test suites to include other suites as well as test cases,
is there a global count of how many tests the TestRunner has executed, will be executing?
Any way I can progammatically access that count?
...
After writing new methods and unit tests for them I usually check the code coverage using the Agitar Eclipse plugin.
But additionally to business logic there's a lot of logging code like:
if(log.isDebugEnabled()) { log.debug("Angela Merkel is REALLY hot!"); }
When Agitar checks this code, it (of course) complains about the fact, that...
I'd like to write some unit tests for some code that connects to a database, runs one or more queries, and then processes the results.
(Without actually using a database)
Another developer here wrote our own DataSource, Connection, Statement, PreparedStatement, and ResultSet implementation that will return the corresponding objects base...
Is there a way to select which TestMethods you want to execute in Visual Studio 2008 Unit Test project while debugging? I want to debug one particular test without having my other TestMethods execute during each debug session.
...
We have some methods that call File.Copy, File.Delete, File.Exists, etc. How can we test these methods without actually hitting the file system?
I consider myself a unit testing n00b, so any advice is appreciated.
...
What's the best way to unit test protected and private methods in Ruby, using the standard Ruby Test::Unit framework?
I'm sure somebody will pipe up and dogmatically assert that "you should only unit test public methods; if it needs unit testing, it shouldn't be a protected or private method", but I'm not really interested in debating t...
Much related to this question, we have a scenario on my team where we need to copy the contents of a folder for a suite of libraries and configuration files for said libraries to our folder where our test code is running from, as part of the test's deployment step.
Due to the installation size, and other factors, checking in this instal...
I have classX:
Sub New(ByVal item_line_no As String, ByVal item_text As String)
' check to ensure that the parameters do not exceed the file template limits
Select Case item_line_no.Length
Case Is > m_item_line_no_capacity
Throw New ArgumentOutOfRangeException(item_line_no, "Line No exceeds 4 characters")
...
My new project is targeting an embedded ARM processor. I have a build system that uses a cross-compiler running on an Ubuntu linux box. I like to use unit testing as much as possible, but I'm a little bit confused about how to proceed with this setup.
I can't see how to run unit tests on the ARM device itself (somebody correct me if I...
In .NET should you place unit test projects in with the rest of the solution? Or should there be a test solution that houses all the test projects?
We have all the test projects in with our code base solution...it seems a bit cumbersome.
What do you usually do?
...
I'm currently running Visual Studio 2008 Standard Edition and one of the items they cut out for that edition is the unit testing capability. As a result, when I open up example projects like the MVC commerce test, one of the projects just won't load since it doesn't know to open that type of project.
I know I can just exclude or remove ...
I use the Boost Test framework to unit test my C++ code and wondered if it is possible to test if a function will assert? Yes, sounds a bit strange but bear with me! Many of my functions check the input parameters upon entry, asserting if they are invalid, and it would be useful to test for this. For example:
void MyFunction(int para...