I'm just getting into using VS2008 to write clr stored procedures for SQL 2008. When writing c# code I am used to having a separate 'Test Project' where I would place all my unit testing code, however it appears at first blush that I can't have the same setup with a clr sql project with stored procedures. It 'feels' like this can be do...
I want to write a unit test of just the GUI part of my Cocoa application.
In the textbook unit test, there's a test framework and test case that calls the unit under test. All the code below that unit is mocked out. So, both the input and the output are controlled and monitored; only the code in the unit under test is tested.
I want to...
I'm using google unit testing code.
I'm building it quite nicely with xcodebuild on the command line. Now I want to run it (preferably on attached Device but simulator would also work) and catch all the feedback from the tests.
But I can't find out how to run it. Any ideas?
...
I have a module that imports unittest and has some TestCases. I would like
to accept some command line options (for example below, the name of a data file),
but when I try to pass the option I get the message "option -i not recognized". Is it possible to have unittest + provide options to the app (note: I'm using optparse to handle the o...
How to verify a result of program that is hard to grasp? For example a year ago I had to wrote a B tree as schoolwork and I really struggled with that mainly because I was clueless how to verify proper result. What strategies do you use in such scenarios? Visualization? Robust input-->result sets of testing data? What do you do when is h...
I have log4net loggers configured to run with my unit tests, but for a few select unit tests that serve as perf tests I want to disable logging. How can I disable (and later re-enable) logging at runtime, basically overriding the logger settings that are in my .config file?
...
I am currently writing unit tests for an application near completion (before management looks at it and turns it inside out). I am testing the business layer and a method is set to return a datatable of all "GroupID"s, which are simply an integer to represent the group that a user belongs to.
I'm assuming the best way to assert on this...
I've got lots of unit tests which needs lots of txt, data, html etc. files. Externally storing these files makes life so much easier to update test cases adding new test cases etc.
However having dependencies in Unit Tests brings lots of headache in different systems and in different test runners.
What are the best practices?
Extern...
I have an Eclipse project with many unit tests written in Groovy. I can run the tests in each individual class using Eclipse's GUnit run configuration. I open this configuration, select the "Run a single test" radio button, and select the class whose tests I want to run. This works fine, however I want to run all of the tests in the the ...
Hi, does anybody have any experience writing unit tests for sql server 2000 DTS packages?
I about to start working with DTS and jobs, so I want to be able to unit test as much as possible. I guess i could invoke dtsrun.exe via command line , but perhaps someone else has better ideas.
Thanks
Fede
...
Can anyone suggest a simple setup of a servlet in java that supports pipelining?
(It is for unit testing, so simplicity is better than scaleability).
...
I just wrote some new utility methods within a non-page class for an existing .NET webforms application and decided to try to unit test using the VS unit test framework rather than testing by hand. I've used the unit test tools before, but only on EXE and MVC projects, and am encountering an error connecting to the WebHostAdapter no mat...
I have started to write my tests as static functions in the class I want to test. These functions usually test functionality, they create a lot of objects, measure memory consumption (to detect leaks), etc.
Is this good or bad practice? Will it bite me in the long run?
...
Possible Duplicate:
Writing unit testable code?
I am new to unit testing. Today on SO I found an answer to a question about interfaces in c#. That got me thinking about best practices for building an applications that's testable by design.
I use interfaces very lightly in the main application that I work on. That's made it v...
Is there a mock implementation for a ftp server that I can use in my UnitTests. I don't want my tests to depend on a real FTP server.
For JAVA a ftpmock can be found here.
...
I'm trying to test my Django apps which run on a postgis database, by following this doc:
http://docs.djangoproject.com/en/dev/topics/testing/
Normally I create a new database by copying a template:
(as user postgres)
createdb -T template_postgis -O lizard test_geodjango2
When I run ./manage.py test, I get the following mess...
ASP.Net app in Visual Studio 2008
I'm creating unit tests to test (in)valid logins for a web app. I have an Authenticate(User,Pass) bool method. The null case and invalid password tests are properly working.
My question is how to test a valid login. I have accounts that are valid for the web app, but I feel like hardcoding in the u...
Suppose I have several small test cases. Easy enough to setup and easy enough to execute.
Suppose each small test case could perform multiple checks.
As I buy into the fact that one test case should ideally check one condition, I believe to have a few options to implement such a requirement.
Create a base class with all the test cases...
I am thinking of using SQLite as an in memory stub for my Oracle database. I can easily direct all my DAL commands to the SQLite, but I am now wondering how I should easily populate the data for each test method.
Should each method begin by creating the needed table(s) and inserting the rows for the specific test? Should I populate in th...
Hi,
how would one test a method that returns a complicated object that does not allow access to its fields. Consider this snippet--
public ResultState getResultState(){
ResultState resultState = new ResultState();
// logic //
this.resultState = resultState; //set parent class field
return resultState;
}
ResultState is an ob...