testing

Devising a test strategy

As part of a new job, I have to devise and implement a complete test strategy for the company's new product. So far, all I really know about it is that it is written in C++, uses an SQL database and has a web API which is used by a browser client written using GWT. As far as I know, there isn't much of an existing strategy, except for u...

How do i assert my exception message with JUNIT Test annotation ?

i have written a few junits with @Test annotation. If my test method throws a checked exception and if i want to assert the message along with the exception, is there a way to do so with JUNIT @Test annotation.AFAIK, Junit 4.7 doesnt provide this feature but does any future versions provide it. I know in .NET you can assert the message a...

Is there an HTML CSS testing bin similar to jsbin

Is there a page similar to JSbin where I can test HTML and CSS + provide "fiddlable" examples to you? ...

What's the best way to view/analyse/filter huge traces/logfiles?

this seems to be a reoccurring issue: we receive a bug report for our software and with it tons of traces or logfiles. since finding errors is much easier when having a visualization of the log messages/events over time it is convenient to use a tool that can display the progression of events in a graph etc. (e.g. wireshark (http://www.w...

How can I get 100% test coverage in a Perl module that uses DBI?

I am a bit new to the Devel::Cover module, but have found it very useful in making sure I am not missing tests. A problem I am running into is understanding the report from Devel::Cover. I've looked at the documentation, but can't figure out what I need to test to get 100% coverage. Edit - I should make it clear that I am not sayin...

Can scrum work for testing projects?

Hi, can anyone comment on whether scrum works for testing projects? Meaning if my company gets a testing project can I implement scrum in it? ...

How do I use beta Perl modules from beta Perl scripts?

If my Perl code has a production code location and "beta" code location (e.g. production Perl code us in /usr/code/scripts, BETA Perl code is in /usr/code/beta/scripts; production Perl libraries are in /usr/code/lib/perl and BETA versions of those libraries are in /usr/code/beta/lib/perl, is there an easy way for me to achieve such a set...

How can I beta test web Perl modules under Apache/mod_perl on production web server?

We have a setup where most code, before being promoted to full production, is deployed in BETA mode - meaning, it runs in full production environment (using production database - usually production data; and production web server). We call that stage BETA testing. One of the main requirements is that BETA code promotion to production mu...

How to test COM object integrity automatically?

Every COM object must have integrity. In simplified terms this means that if an object implements 3 interfaces - A, B and C and I have A* pointer to the object I must be able to successfully QueryInterface() both B and C and having B I must be able to retrieve A and C and having C I must be able to retrieve A and B. Now my object implem...

phpunit - generate tests for all the classes from a directory

Hi! I have a directoy structure, and all the classes of the business logic are placed in the app_dir/lib/ directory. I would like to generate unit tests for all the classes from this lib/ folder. The problem is, that I haven't found any option to specify the source directory, only the source file: from app_dir: phpunit --skeleton-c...

Testing custom rails model methods

I have a number of models that store words as a string with each words separated by a space. I have defined model methods to delete and add words to the string and the size or number of words is updated each time accordingly. There is an error somewhere because the size sometimes comes out to be negative. I'm wondering, what is the be...

Dashboard for collaborative science / data processing projects

Hi, Continuous Integration servers like Hudson are a pretty amazing addition to software development. I work in an academic research lab, and I'd love to apply similar principles to scientific data analysis. I want a dashboard-like view of which collections of data are fine, which ones are failing their tests (simple shell scripts, mo...

Testing variable types in Python

Hello, I'm creating an initialising function for the class 'Room', and found that the program wouldn't accept the tests I was doing on the input variables. Why is this? def __init__(self, code, name, type, size, description, objects, exits): self.code = code self.name = name self.type = type self.size = size self.d...

Should a Unit-test replicate functionality or Test output?

I've run into this dilemma several times. Should my unit-tests duplicate the functionality of the method they are testing to verify its integrity? OR Should unit tests strive to test the method with numerous manually created instances of inputs and expected outputs? I'm mainly asking the question for situations where the method you are...

How to make sure web services are kept stable from one release to the next?

The company where I work is a software vendor with a suite of applications. There are also a number of web services, and of course they have to be kept stable even if the applications change. We haven't always succeeded with this, and sometimes a customer finds that a service is not behaving as before after upgrading. We now want to han...

How to test a DAO with JPA implementation ?

Hi I came from the Spring camp , I don't want to use Spring , and am migrating to JavaEE6 , But I have problem testing DAO + JPA , here is my simplified sample : public interface PersonDao { public Person get(long id); } This is a very basic DAO , because I came from Spring , I believe DAO still has its value , so I decided to add...

Testing the program in different OS

I want to test my program by installing it in different OS versions. My development computer is Ubuntu. What other Linux versions can I test by installing them inside VirtualBox and running my program there? Though it is not critical for me right now, I want to try something different and see what happens. Also, what is the chance that...

Rails testing with factories. Transactional uniqueness problem.

I keep getting validation errors when running factories due to uniqueness constraints on fields. I am using shoulda with factory_girl. I have a both a unit test and a functional test creating 2 products in the database. I can run 'rake test:units' and 'rake test:functionals' over and over in any order and everything is will be green b...

Good books and resources on user interface testing

I am looking for good books and articles on user-interface testing. What they should contain (one or more of): different test methods/strategies examples, use cases naming pros and cons for different methods testing functionality testing usability (less important for my me but still good) something important I might have forgotten :-) ...

How can I test ActiveRecord::RecordNotFound in my rails app?

Hi, I have this code in my controller and want to test this code line with a functional test. raise ActiveRecord::RecordNotFound if @post.nil? which assert method should I use? I use the built-in rails 2.3.5 test framework. I tried it with this code: test "should return 404 if page doesn't exist." do get :show, :url => ["noth...