I have a test setup where I have many very similar unit tests that I need to run. For example, there are about 40 stored procedures that need to be checked for existence in the target environment. However I'd like all the tests to be grouped by their business unit. So there'd be 40 instances of a very similar TestMethod in 40 separate cl...
I'm just getting started with TDD and am curious as to what approaches others take to run their tests. For reference, I am using the google testing framework, but I believe the question is applicable to most other testing frameworks and to languages other than C/C++.
My general approach so far has been to do one of three things:
Write...
I have implemented secured login and signup in my website.It working.Now I want to test it.I am not sure how to test whether it is correctly secured.
...
Good day,
I am learning Testing in Visual Studio C++ and I have several tutorials which I have followed. I am trying to load a test fixture. I have tried to put the test .cpp file in many different places but it will still not pick up on it when I click on "Run Tests" or "Run Tests without debugging"
In the tutorials I found, they seeme...
Hi,
For some reason I can't get my test's to load in my project.
In the test explorer it says
"This process exited without registering with the agent - this may be due to the module not containing any test fixtures"
....I've tried Right Click->Add TestFixture, and adding them other various ways
I can get it to work on a blank projec...
I am looking to skip a certain statement in my unit tests eg:
if (MessageBox.Show("Are you sure you want to remove " + contact.CompanyName + " from the contacts?", "Confirm Delete", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.Yes) == MessageBoxResult.Yes)
is there an attribute i can place above the statement to ...
What program is best to unit test a exe targeted project in Visual Studio 2008, VC++?
...
Is there any way to deploy an item without using this attribute? I'm starting to get a stack of attributes over my test base and it's becoming hard to maintain. Most of my items are DLLs that need to be put into a folder below the deployment directory.
...
I'm using the zend modular director structure, i.e.
application
modules
users
controllers
.
.
lessons
reports
blog
I have a unit test for a controller in 'blog' that goes something like the below section of code:
I'm definitely doing somet...
I'm just starting to use QTestLib. I have gone through the manual and tutorial. Although I understand how to create tests, I'm just not getting how to make those tests convenient to run. My unit test background is NUnit and MSTest. In those environments, it was trivial (using a GUI, at least) to alternate between running a single test, o...
In my research about rolling back transactions in EF4, it seems everybody refers to this blog post or offers a similar explanation. In my scenario, I'm wanting to do this in a unit testing scenario where I want to rollback practically everything I do within my unit testing context to keep from updating the data in the database (yeah, we'...
Assuming I have a class with a method that takes a System.Linq.Expressions.Expression as a parameter, how much value is there in unit testing it?
public void IList<T> Find(Expression expression)
{
return someCollection.Where(expression).ToList();
}
Unit testing or mocking these sorts of methods has been a mind-frying experience fo...
Still Now I am using JUnit, I came across EasyMock, I am understanding both are for the same purpose.
Is my understanding correct?
What are the advantages does EasyMock has over the Junit?
Which one is easier to configure?
Does EasyMock has any limitations?
Please help me to learn
...
Hi,
I have a question about unit testing.
Say I have a controller with one create method which puts a new customer in the database:
//code a bit shortened
public actionresult Create(Formcollection formcollection){
client c = nwe client();
c.Name = formcollection["name"];
ClientService.Save(c);
{
Clientservice would call ...
I am currently working on a module that takes one of our business objects and returns a json representation of that object to the caller. Due to limitations in our environment I am unable to use any existing json writer, so I have written my own, which is then used by the business object writer to serialize my objects. The json writer is...
Hi,
i call a controller action in a unit test.
ViewResult result = c.Index(null,null) as ViewResult;
I cast the result to a ViewResult, because that is what i'm returning in the controller:
return View(model);
But how can i access this model variable in my unit test?
...
when i run
rake test --trace
here's what happens
** Invoke test (first_time)
** Execute test
** Invoke test:units (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
** Execute db:...
How can I write a unit test to test the actualWidth property to a userControl in Silverligh 4?
I hoped that this method would pass, but it fails.
I am using the Silverlight ToolKit april 2010, and VS 2010.
<TestMethod()> _
Public Sub TestAcrtualWidth()
Me.MyUserControl.Width = 100
Me.MyUserControl.UpdateLayout()
Assert.Is...
Is it possible to run the ADL without a GUI so that I can run FlexUnit tests during a nightly build? Right now, when I execute our test runner on our server (Ubuntu 9.04) it fails with the output: "Gtk-WARNING **: cannot open display:".
Many thanks for any suggestions!
...
I have inherited a large and firaly complex state machine at work.
It has 31 possbile states to be in.
It has the following inputs:
Enum: Current State (so 0 -> 30)
Enum: source (currently only 2 entries)
Boolean: Request
Boolean: type
Enum: Status (3 states)
Enum: Handling (3 states)
Boolean: Completed
The 31 States are really nee...