testing

How can I split abstract testcases in JUnit?

I have an abstract testcase "AbstractATest" for an interface "A". It has several test methods (@Test) and one abstract method: protected abstract A unit(); which provides the unit under testing. No i have multiple implementations of "A", e.g. "DefaultA", "ConcurrentA", etc. My problem: The testcase is huge (~1500 loc) and it's growin...

Question on Email transiting rules

I haven't poured over the RFCs on this one and was hoping that someone would know off-hand. Pretend I have a basic mail server example.com I telnet into example.com at port 25 and do something like this: EHLO hi MAIL from: [email protected] RCPT to: [email protected] DATA Hello world . I think that is valid syntax (if not, let'...

How to test iPhone application through Test User ?

I have submitted my application , it is in review right now. How to create in app purchase .. once i created in app purchase, how to test it using storekit framework in sandbox ..? ...

Mockito: How to test my Service with mocking?

Hi, I'm new to mock testing. I want to test my Service method CorrectionService.CorrectPerson(Long personId). The implementation is not yet written but this it what it will do: CorrectionService will call a method of AddressDAO that will remove some of the Adress that a Person has. One Person has Many Addresses I'm not sure what the ...

Replicating Active Directory - testing scenarios

Replicating a production server's Active Directory is possible through a number of approaches as mentioned here and here. I'm looking for a simpler approach if one exists. I have a mixed-mode authentication site that I need to test. Quite simply AD users (internal) will have more privilege's than someone who logs in via forms (external)...

How to instrument Oracle 10g to get table access metrics?

We have a legacy/production database. It has been in continuous development and use backing a website that has evolved over 10 years. The database is accessed by multiple technologies - perl cgi, php and java webapps. Lots of cruft has accumulated. I wish to undertake a major refactoring. I am sure some parts are completely legacy (the...

MVP : Dialog boxes that return value and testable code

In my MVP pattern (Passive view) based application (.NET), I have separated out the message boxes into the View so that when I test my presenter and model my testing code is not affected by the need to show user some information. But I don't know how to accommodate dialog boxes, when user's input is required to decide on a course of acti...

Why won't Visual Studio Tester Edition run my web tests?

I created a new test project with web tests as described in Microsoft's documentation here. However, when I try to run a web test, even if it's just a blank test, I get the following error: Request failed: Could not run Web test 'WebTest1' on agent 'MYCOMPUTER': Method not found: 'Void Microsoft.VisualStudio.TestTools.WebTesting.WebT...

Does it make sense to unit test throwaway code that runs in production?

One of the primary benefits of unit testing is to provide confidence that when one needs to later alter the code one is not breaking it. However, what benefits does unit testing provide for code that is literally used as one-off throwaway code? This throwaway code is most certainly used in production, but is never actually altered once i...

interview assignment

My company is looking for a new web developer and we are eager to find someone that would be efficient as soon as hired and capable of making quality code. I will have to take interview and I would like to give them an assignment, so I can see their general programming skills if they are able to use CSS the general quality of what they...

Rhino Mocks overwriting stubs possible?

I have this problem, which may be a bug in Rhino Mocks 3.5: stubObj = MockRepository.GenerateStub(IObject); stubObj.Stub(a=>a.Get()).Return (Guid.Empty); //1.stub stubObj.Stub(a=>a.Get()).Return (Guid.NewGuid()); //2.stub, should overwrite the first one? this: var value = stubObj.Get(); returns Guid.Empty, is this the correct beh...

altering locale settings of system/browser to test javascript functions

I'm writing a small JavaScript function to generate a date selector for use in various languages. I want to test the JavaScript date functions toUTCString, toLocaleString, toLocaleDateString in english, french, german, italian and spanish. How do I affect the locale settings that are used by the date object. I've tried changing my windo...

Using mocking during testing does it worth the effort?

During this semester my professor tried to convince us why is good to use unit tests during development, why is it good to validate data(Microsoft Application Block) and also he told us about using mocking(RhinoMocks) in order to test our methods when we didn't had access to a database. I had to do some unit tests with mocking and in or...

Instrumentation testing

I have written an instrumentation test case,When I try to run this,I got the following error java.lang.RuntimeException: Exception during suite construction at android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests.testSuiteConstructionFailed(TestSuiteBuilder.java:239) at java.lang.reflect.Method.invokeNative(Native Method) at a...

Preferred Testing tools

May I know the testing tools that people commonly use for testing web or windows applications. Is there any free tools that are available or there are any other tools that can be bought that really adds a great value? Please share your thoughts or comments ...

Has anyone used Robotium or Calculon for testing Android apps?

Has anyone used Robotium or Calculon for testing Android apps? Are they useful? Any recommendations on which is better? ...

Testing ASP.NET webforms applications

If you're in my position you have a big WebForms applications which have escalated to this unmaintainable thing. Things break when you add new features and you need an inexpensive maintainable way to do some kind of automated testing. Now, from my understanding, the right thing to do would be to try building an abstraction layout of the...

Daily testing of online applications (by humans)

Hello, we've got various online applications (public sites, closed user sites). These sites are backed by our own applications which again interact with different other online services / databases. We import data every night and also change the application frequently. So far nothing special. Of course from time to time something breaks...

Accessing AlertDialog in AndroidTestCase

I'm using ActivityInstrumentationTestCase2 to do automated black-box testing on my GUI. Is there a way to click on a dialog, or get Views belonging to the Dialog in unit tests? The only way I could come up with is to keep a reference to the dialog and have my Activity implement a getter method to let testcases access the dialog. Is ther...

BDD with ASP.NET MVC

Hi there, I just started devoloping ASP.NET MVC Web applicatons. One thing I like about ASP.NET MVC is the built in test environment. It gives you the possibility to write unit tests and built test driven web applications (TDD). But I'm missing the possibility to do behaviour driven development (BDD). BDD can be done nicely using Ruby ...