testing

For quick testing, portable Linux or portable programming language?

Hi all: My current role requires me to setup environment which mimics the customer's and perform various checks to replicate and then analyze the problem. Chances are, I often find working with Windows environments such like XP, Server 2003, Server 2008 is a bit painful without having the handly linux-based shell and some command-line ...

Unit Testing in Qt with Highly Dependent Functions

I'm new to unit testing. I want to code unit tests in Qt, but my functions(login, request etc...) heavily depend on other resources such as a server. How can I supply a block box in this situation? Do you know any open source project which I can examine unit test classes for similar situations? ...

[PHP] UnitTests fail, manual test passes

Hi, There is something weird going on in my code so i have to ask. I have a part of a test: public function testGetAddresses() { //$this->markTestIncomplete('Not implemented yet'); $this->assertTrue($this->_prs->getAddresses() instanceof Crm_Collection); } This test fails. But when I do this: if ($entity->getAddresses() in...

How to execute all views in database through stored procedure

We have a problem with our table schema falling out of sync with our view schema. I would like to know how I could have a stored procedure (for Sql Server) that gets all views in the database, and executes each one via select * Here is what I imagined (pseudo): Declare x Set x = Select object from sysobjects where object = view fore...

Help understanding how different kinds of tests are called

I'm making an application similar to Auto Hot Key, which reads some pixels in the screen, makes some computations and then performs some mouse clicks. I have 3 different kinds of tests which I intend to do: I know I'll make use of Unit Tests, for testing indivudal classes to make sure each one of those makes what it's supposed to do. ...

J2EE test deployment conflict resolution how to?

Just stuck with this problem Developer A changed file aaa.jsp in his svn branch and then our admin deploy that version to the test server. Test starts. Lets say 3 days later, developer B changed the file aaa.jsp in her branch and then our admin deploy that version to the test server. Test starts. Right now Developer A's version has be...

How do I test code that should never be executed?

Following method shall only be called if it has been verified that there are invalid digits (by calling another method). How can I test-cover the throw-line in the following snippet? I know that one way could be to merge together the VerifyThereAreInvalidiDigits and this method. I'm looking for any other ideas. public int FirstInvalidDi...

Javascript function testing using gtest

Hi All, I am exploring the possibility of testing javascript functions using gtest. I am just 2 days old in gtest. PLease help. Thanks ...

Adding tests to sdist, but not installing

Hi, I'd like to add tests to the sdist package in my setuptools distribution, but I don't want them installed / in bdist. I already have: setup( ... packages = find_packages(exclude='tests'), test_suite = "tests", ... ) But currently the tests/* are always included. How can I change that? ...

What is a good way to do a light unit-testing in an Rails web application?

I am on a tight timeline with minimum resources for a project. I would like to practice test driven development for this project, but realistically, i would not have time to learn any of the more sophisticated frameworks like Cucumber, Rspec, etc. And it would probably be counter-productive at this point anyway What do you recommend i...

Remove temporary files after doing tests

During doing unit tests in Rails a few temp files are created (associated with model). When test is done I want to remove these files, so I have to find a way to do this no matter the test passes or not. So, what are you suggestions? ...

Webrat (web_steps.rb) not being used

When I execute the following cucumber script: Feature: Manage Customers In order to store customers As a user I want to create and manage customers Scenario Outline: Create Customer Given I am on new customer screen When I fill in Name with "Test Company" And I press "Create" Then I should see "Custome...

Are there any tools for testing installer packages?

As part of our nightly build on windows, an installer package is created using NSIS. I would like to automatically test the "correctness" of the installer. This might be things like: Checking the platform of dll files. Checking the install folder. Testing the uninstall function doesn't leave any files behind. Checking registry keys ar...

How to develop a StopWatch class test first?

I'm currently trying to implement a StopWatch class. The interface is something like: interface IStopWatch { void Run(); void Stop(); int SecondsElapsed { get; } int MinutesElapsed { get; } } Basically my app will need to use a StopWatch, but for testing purposes it'd be nice to have a way of artifially modifing a Stop...

How can I write a test for this ajaxious form?

I have this form and in it I have this: <%= f.select(:category_id, categories_for_select) %> <%= f.select(:subcategory_id, options_for_select(["Choose category"])) %> Then, when the user change the category the subcategories select box fill itself via ajax. Both of the category and subcategory are mandatory for my model and included ...

Learning cross-browser development (CSS/XHTML)

I have been out of the loop with web development for about a year and a half now. My current project is working/functioning well with OS X browsers; Google Chrome, Apple Safari and Mozilla Firefox (minus a few things). Many things have changed since I was working heavily with these technologies. Does anyone have any suggestions in the ...

Optimization of Android Applications

Hello, I want to do optimization of my android application. Can anyone please tell what are different ways to optimize code and performance in android? I gone through one tool i.e. Zipalign: an Easy Optimization. Any other tools avaliable? Thank you. ...

Where I can learn Cucumber in detail?

I am new on Ruby on Rails testing. I have seen many testing tools, such as Rspec,Cucumber,Seleneium,Watier etc. but could not detail information about that. Please give me a link for this. ...

What quirks should I look out for when developing for the Samsung Galaxy S?

I recently released a game on the Android market. It seems to be working fine for most people, but everyone using a Samsung Galaxy S is reporting the same problem: The graphics for the game are not being drawn on screen (though they appear to be present, sound effects are still generated). The game uses a SurfaceView to draw the various ...

What's wrong with my Javascript regex ?

I would like regex to match if and only if the string is none, family or work (but not my family, for example). Why the following code results with "match" ? Why ^ and $ do not work ? var regex = new RegExp("^none|family|work$"); var str = "my family"; document.write(regex.test(str) ? "match" : "no"); ...