What is the easiest way to create some kind of test harness for Android apps and to be able to visualize (even on the emulator) what is going into the db? I want to test things like constraints, look at the data, unit test methods, etc.
Is there any kind of GUI tool that I can hook up to the emulator to be able to look at the db of a p...
I have a standalone Django app that I'm working on right now. You can see the code at Github. In one of the edits, I introduced an error that caused the source tree to be deleted. I reset to an earlier revision, and suddenly my unittests stopped working. I've tried bisecting from an earlier revision, but it turned out nothing useful.
A...
I cannot access the context attribute of an HttpResponse object from ipython. But the unit test accesses context.
Here is the unit test. The test run passes properly:
from django.test import Client, TestCase
from django.core import mail
class ClientTest(TestCase):
def test_get_view(self):
data = {'var': u'\xf2'}
re...
I know it is possible for VS 2008 to generate unit test code to test C# classes, but I cannot find the right sequence of mouse clicks to generate the code. Any help?
...
Haskell is a pure functional language, which means Haskell functions have no side affects. I/O is implemented using monads that represent chunks of I/O computation.
Is it possible to test the return value of Haskell I/O functions?
Let's say we have a simple 'hello world' program:
main :: IO ()
main = putStr "Hello world!"
Is it poss...
Hi there,
I am new to Mocking and somewhat familiar with unit testing and finally have decided to bite the bullet on a new project starting up front with a strict TDD approach. However I have one service class and method I need to retrospectively add tests to as it has been promoted from a prototype.
I do not know where to start thoug...
I've already checked this.. similar question but I am not convinced about the answers...
I currently have an interface that is only being implemented by one class, but that is going to change sooner or later. I currently have a test against the interface, and all tests at the beginning start with:
IFoo foo = GetConcreteFoo()
where Ge...
If I have a basic accessor method that returns an ArrayList
What exactly would i test for it?
I am very inexperienced when it comes to testing.
...
Hi,
At the minute all my fixtures have the same name as the table that they are intended for, because of a recent issue with rails it doesn't seem possible to have a fixture beginning with the word 'test'
Does anyone know of a way to have a different fixture name and then map it to the correct table?
Thanks,
Andy
...
I am doing some unit tests and I want to know if there's any way to test if a list is ordered by a property of the objects it contains.
Right now I am doing it this way but I don't like it, I want a better way. Can somebody help me please?
// (fill the list)
List<StudyFeedItem> studyFeeds =
Feeds.GetStudyFeeds(2120, DateTime.Today.Ad...
I'm interested in both xpath matching and full document comparisons:
assert_that(mydoc, hasTextAtXPath('/foo/bar', 'text'))
assert_that(mydoc, matchesStructurally('<some_xml/>'))
Does any matcher library exist for this? If not, what is the best place to start with for this type of comparison, so that I can write one of my own?
...
I am having a issue with boost unit testing. Basically I create a fixture which is part of a suite to unit test a Resource cache. My main issue is between tests the Resource cache is becoming empty. So the first test that tests the cache passes then the second one will fail because the data the first test inserted into the cache is no...
I have started using Subsonic for a side project and have been loving using it. Simply a blast. I started off wanting to use the LINQ T4 Templates but have since switched to the ActiveRecord templates due to testability. It is very clear how to write unit tests using the active record templates but for the LINQ templates there is no clea...
Hi all:
I would just like to ask whether I would be able to unit test the code inside ExternalFunction within the document.ready? I have tried many things for a while now and still couldn't work out how, and am at my wits end.
$(document).ready(function () {
var originalExternalFunction = ExternalFunction;
ExternalFunction = f...
I'm having trouble using Rhino Mocks to assert that a method was called (and ideally with a particular parameter). The Method is ILog.Debug(FormatMessageHandler) in Common.Logging 2.0 using the new lamba syntax. It works fine using the old way plain ILog.Debug(string).
// Sample Code to Test
public int TestFuncLambda(ILog log,...
using MS Test how can verify the exact error message coming from a test method. I know [ExpectedException(typeof(ApplicationException), error msg)] doesn't compare the error message coming from my test method, though in other unit test framework it is doing.
One way to solve this problem is to write my uni test using some try catch bloc...
Hi,
I've recently begun unit testing an app I write for the iPhone. I have the basics of creating my own tests down, even if it seems a little sub-optimal. I am, however, having real trouble setting up code coverage analysis using gcov.
I followed the instructions here: http://www.cubiclemuses.com/cm/articles/2009/05/14/coverstory-on-t...
This is my scenario, I want to make a Data-Driven unit test, and for being environment-independent i want to embed the data file in my assembly. How can i reference then in the DataSourceAttribute of the Unit Test?.
I'm trying to access an Excel 2003 file using the Microsoft Jet OleDB Provider. The unit test works fine when the file is ...
I am using RhinoMocks. Now I want to assert that some function was called, but I only care about one of the arguments. Can I do a AssertWasCalled where I only specify one argument?
In the following example I'd like the ignore what was sent to the second argument of SomeOtherFunction(). I.e. I want to check that SomeOtherFunction was ca...
I have a unit test for an Http handler. In it I create a HttpResponse object and pass it to one of my Http handler's methods.
One of my tests attempts to verify that the response headers have been set correctly:
Assert.AreEqual( "gzip", response.Headers["Content-Encoding"]);
However, the Headers property throws a PlatformNotSupported...