testing

How are both of these tests passing?

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...

Does Moq replace standard VS 'Assert' testing?

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...

Testing with Visual Studio Test 2010

Does any one know if I can test native code in VS Test 2010? ...

Web Site testing stategies.

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...

C++ unit testing with VS test professional.

Does any one know if I can test native code in VS Test 2010? ...

Testing in Python - how to use assertRaises in testing using unittest?

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...

Maven 2 multi module pom

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...

best way to measure (and refine) performance with PHP?

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? ...

c program code for testcases

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 ...

Virtual machine vs physical machines for QA/UAT? .Net Runtime bug on VM Slices

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...

How to perform own assertions with coded UI testing

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...

How to create production database sample for testing?

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...

Password protect a whole .net mvc application?

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 ...

Symfony -- How to write a functional test with user authentication?

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', '...

Test framework allowing tests to depend on other tests

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...

"Test with debugger" in ReSharper?

"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. ...

How can I simulate the browser back button in Capybara?

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...

What is test data for a calculator application so that it covers all the functions of a calculator.

I want to test a calculator application and need such a test data that covers all scenarios and functionalities of calculator. ...

Testing ssh connection

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...

Which BDD framework allows a simplistic approach to "story writing"?

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...