I'm using Shoulda, Mocha, and Test::Unit for testing. I have the following controller and test:
class FoosController < ApplicationController
caches_action :show
def show
@foo = requested_foo
end
private
def requested_foo
Foo.find(params[:id])
end
end
class FoosCachingTest < ActionController::IntegrationTest
def s...
I am trying to understand how to use Moq, however I am having some confusion about what Moq should be used for. My understanding is that mock framework are used for generating objects which would be difficult to create under normal circumstances. The examples I have seen of Moq however seem to not only create Moq object, but also provide...
Does any one know if I can test native code in VS Test 2010?
...
Hello
I've been Googling this one, on and off, for a few days now. When generating non-commercial Web sites, what's the best strategy when it comes to cross-browser testing? I use Windows 7 and Textpad to develop my HTML/CSS/JavaScript/PHP - i.e.: no dreamweaver, kompozer, Etc.
I currently test using Firefox 3.6 and IE8. The last ti...
Does any one know if I can test native code in VS Test 2010?
...
Hi,
I am trying to do a simple test in Python using unittest, to see if a class throws an exception if it gets an unsuitable input for the constructor. The class looks like this:
class SummaryFormula:
def __init__( self, summaryFormula):
self.atoms = {}
for atom in re.finditer( "([A-Z][a-z]{0,2})(\d*)", summaryForm...
I have recently started migrating my project from ant to maven. I have two module in my application which I am able to build using maven.
Now I have automated tests project which use Web Driver for testing UI functionality. What I am trying to do using maven is to build both module wars and deploy them on to tomcat. Then run automation...
A site I am working with is starting to get a little sluggish, and I would like to refine it. I think the problem is with the PHP, but I can't be sure. How can I see how long functions are taking to perform?
...
hi,
I have asked to write c program for HDMI EDID test cases in set top box....i am new to c programming..i dont know how to write c program for testing set top box which respond to all kind of resolution...that means the set top box have to convert the sourse signal resolution to display device resolution....if you know any small idea ...
My IT department is pushing me to use VM slices for out QA and UAT testing. I believe we should be using identical physical hardware to Prod.
Our prod setup uses 5 high-spec servers. For QA there would be 5 vm slices on a single high-spec machine.
Apart from the performance difference I’ve also experienced .Net Runtime crashes on VM sl...
Hello,
I'm working with the visual studio 2010 codedUI tests.
I want to be able to perform a little more than i can at the moment.
e.g. I can can Assert if a particular field "AreEqual" to or "Contains" etc, but i want to do more.
eg, i want to check if the field contains a numerical value within it.
I edited the UIMap.Designer.cs an...
Is there a tool (for PosgreSQL, ideally), which can make a small, but consistent sample of a big database?
The this is we need a testing database, but we don't want to fully copy the production one. First, because it is too big and second, the nature of testing implies that the testing database will be recreated several times in the pro...
Hellu,
I want to put a password protection on my entire web application for development and testing purposes. I would like some simple way to do this (global asax, webconfig etc), which means I don't have to change very much in the rest of my application. The password and username can be stored in the code/webconfig or whatever.
Since ...
I am writing a functional test for a page that requires user authentication. I am using the sfDoctrineGuard plugin.
How do I authenticate a user in my test?
Do I have to enter every test through the sign in screen?
Here is my incorrect code:
$b->post('/sfGuardAuth/signin',
array('signin[password]' => 'password',
'...
I'm wondering if there is a test framework that allows for tests to be declared as being dependent on other tests. This would imply that they should not be run, or that their results should not be prominently displayed, if the tests that they depend on do not pass.
The point of such a setup would be to allow the root cause to be more r...
"TestDriven.NET" has a great feature called "test with debugger". Is there anything like this in ReSharper?
Tried googling this, but can't find anything.
...
We have a issue on our e-commerce site where users occasionally hit "checkout" twice and have their card charged twice.
It's a common enough bug and easy to fix, but I'd like to test the solution in our capybara setup. Once I've called click_button('checkout'), is it possible for me to pretend I'm a user hitting the browsers back button...
I want to test a calculator application and need such a test data that covers all scenarios and functionalities of calculator.
...
Hi,
an important part of my project is to log in into remote server with ssh and do something with files on it:
Net::SSH.start(@host, @username, :password => @password) do |ssh|
ssh.exec!(rename_files_on_remote_server)
end
How to test it?
I think I can have local ssh server on and check file names on it (maybe it could be in my t...
I'm trying to use BDD in a very simple way, in order to minimize the amount of Java code. I want to create exactly two files, one is my story:
Given user is named "John Doe"
And user is authenticated
When user changes his password to "a1b2c3"
Then user password equals to "a1b2c3"
Next, I create a Java class:
public class UserManipul...