I'm considering two possibilities:
include NUnit with the source code
of an open-source project - to make
it very easy for the potential contributors to
run automated tests right away. I feel it is important to promote the "tests-first" culture in this project (or at least make it clear to everyone that tests matter).
distribute the ...
Hi all:
I'm using JsTestDriver and a bit of Jack (only when needed). Does anyone know how to verify that a javascript function has been called during unit testing?
E.g.
function MainFunction()
{
var someElement = ''; // or = some other type
anotherFunction(someElement);
}
And in the test code:
Test.prototype.test_mainFunct...
Let me start from definition:
Unit Test is a software verification and validation method in which a programmer tests if individual units of source code are fit for use
Integration testing is the activity of software testing in which individual software modules are combined and tested as a group.
Although they serve different purposes ...
We are looking for methods to improve our internal processes when developing software.
We have already adopted TDD contiguous integration and Agile. Any obscure features of visual studio or TFS?
All suggestions welcome.
...
Is it okay (conceptually) to run for loops in test methods?
I'd like to test a range of parameter values into a controller, to determine if the different inputs return the correct values.
test "logged in user - add something - 0 qty" do
@app = Factory.create(:app)
(0..5).each do |t|
@qty = t
login(:user)
ge...
Some of NUnit's Assert methods are overloaded to use ICollection but not ICollection<T> and thus you can't use them.
Is there anyway around this? Heck, am I doing something stupid?
I'm having to drop back to using Assert.AreEqual rather than specialised methods and its making my tests ugly.
Any advice?
Edit:
Thanks for the responses...
I'm working on a general code library for ActionScript 3.0 called as3lib which includes several extensions to the core API and some useful functions. I've written several unit tests (using FlexUnit) to make sure everything is working correctly.
What is the best way to organize these tests in the library? Currently, I have all my code in...
Hi,
Is it possible to configure unit tests in Team System Test to run under a specific identity (similar to runas)?
Thanks much,
Jon
...
Hello,
I am working on an Excel VBA macro that will take some excel file, scrub / clean it, and produce a workbook with 2 sheets - sheet 1 being the original 'dirty' file, sheet 2 being the cleanly scrubbed file.
Since we have 10 different formats right now, and down the road 40+.. I would like to save this output for a given set of f...
Say I have this test:
[Test]
public void SomeTest()
{
var message = new Thing("foobar");
Assert.That(thing.Created, Is.EqualTo(DateTime.Now));
}
This could for example fail the constructor of Thing took a bit of time. Is there some sort of NUnit construct that would allow me to specify that the Created time don't have to be ex...
Hi,
I'm currently using MSTest in VS2008 for unit tests, but I am looking at going to xUnit.net.
Question - What would be the easiest way to get my unit tests running continually locally (on my PC) and with some sort of visual alert of pass / # of fails.
i.e. similar to what we do in Ruby on Rails with autospec.
THanks
PS Interseste...
First; I know that I should not need to test the internals of MVC but I REALLY need a suite a tests around data flowing into our system.
How can I, I hope without mocking all of HTTP context, test that objectA (form collection, dict, collection, object, etc) does or does not conform to objectAModel?
I'd like to not have to instantiate...
Hi all:
Currently I'm unit testing the following code:
if ($(selectedElement).innerText == 'blah')
{
// do something
}
with selectedElement being an anchor object selected from the UI.
In my test code, I have created a DOM structure which has that anchor in the proper position ready to be selected. The problem here is that sinc...
Hi all,
I have a set of unit test cases that depend on a test.properties file. When I run the tests under Mac OSX or Linux using Maven ('mvn test'), they work fine. But when running under Windows 7, they can't find the file unless I copy it directly to the class folder. The code to return the properties is the following two methods:
...
I was recently reading a question here (some time this week), which I can't find again ><, where someone was asking about concurrent testing.
One of the suggestions was CHESS however I can't use this due to the licence for the VS2008 Pro version being only for academic use, and I don't have Team System.
Does anyone know of an alterna...
Hi all:
Has anyone tried matching an id with an equal sign (=) in it, and WORKED? E.g.:
// DOM structure
/*DOC += <span id='Test=Test' class='something'></span> */
var test = $('#Test=Test');
I tried the above code. jQuery doesn't like it and returned undefined. However if I match the span's class, I could actually find the span (...
Hello there,
I have solution with >270 projects, it contains various folders and etc. Imagine each project have Unit Tests, what do you think what is the best way to organize them? Should each project have Unit Tests near by, or I should create special folder for them, or even different solution for just unit tests.
How do you organi...
Is there a good book or online site discussing the use of the CppUnit, for a beginner?
...
I have a WCF server that is a library assembly. (I am writing it so I can mock the level below it) It is called var a client helper class that is in a different assembly. As the data that is transferred is complex and the server has to send call-backs to the clients I wish to test the WCF code in isolation.
(I am only interested in t...
Hi! When I test my many to many classes an error occurs:
System.ApplicationException: Actual
count does not equal expected count.
Entities:
public interface IEntity
{
int Id { get; set; }
}
public abstract class Entity : IEntity
{
public virtual int Id { get; set; }
public virtual bo...