testcase

JUnit TestCase object instantiation

Is a new (or different) instance of TestCase object is used to run each test method in a JUnit test case? Or one instance is reused for all the tests? public class MyTest extends TestCase { public void testSomething() { ... } public void testSomethingElse() { ... } } While running this test, how many instances of MyTest class is ...

In agile like development, who should write test cases?

Our team has a task system where we post small incremental tasks assigned to each developer. Each task is developed in its own branch, and then each branch is tested before being merged to the trunk. My question is: Once the task is done, who should define the test cases that should be done on this task? Ideally I think the develope...

Looking for a hosted web application for test case tracking and management

For a current project I am working on I need a way to keep track of test cases. We are currently using unfuddle to keep track of our bugs, documents and source code. Since our app is a fairly complex client/server piece, we need to do some of the testing manually. So, I am looking for a tool that will allow me to describe all the man...

How can I best write unit test cases for a Parser?

I am writing a parser which generates the 32 bit opcode for each command. For example, for the following statement: set lcl_var = 2 my parser generates the following opcodes: // load immdshort 2 (loads the value 2) 0x10000010 // strlocal lclvar (lcl_var is converted to an index to identify the var) 0x01000002 Please note that lcl_...

What is a good test case for bugzilla?

We are using Bugzilla to collect and monitor our bugs, but up until now we did not use any test case tool. Up until now we were doing only manual testing. Which of the available test cases do you recommend, and is it important that this tool fully integrates with Bugzilla? We are a very small company (less then 10 people) that develop ...

Test case data for convex-hull.

I need to make a 2D convex hull function for a class assignment and I want a more robust test cases than the assignment provides. Does anyone known of a largish test cases (25 < n < 100) with the solution? ...

Test data for time remaining predictor

I've got an idea for a better predictor for a time remaining widget but I need some data to run through it to test how well it works. I'd like it to work well for predicting how long a variety of things will take to finish. Things like downloads, installs, computations, etc. What I'm looking for is data in the form of {%done, time} pair...

Lorem ipsum of Perl, C#, C, Java?

In visually testing interfaces where code might live what do you use for your particular language for a standard? "Hello World" is not sufficiently complex enough in most cases. I am particularly interested in Perl but C#, C, C++, and Java are coming up. Per the comment: Lets say you created a new IDE, color scheme, or a web page whe...

What to test in unit testing, a method or a scenario ?

What to test in unit testing, a method or a scenario? If test each method then minimal test case setup is required. If test a method which calls other methods then setup required for the test case is huge. If unit-tests for the individual methods are already there then why to write for this method which is using them? But then it al...

having javascript force a Selenium test to fail

Is there a way for js code to force Selenium testing to fail? For (a probably bad) example, if I had the following: return document.getElementById('foo').innerHTML == 'hello' is there a way I could make the 'runScript' command fail depending on if the js code returned true or false? (I know that example could be used by other Selenium...

Test cases for each link in a Website?

Hi guys, I have a pretty basic question about test cases in the world of Website development. Does it make sense to have a separate test case for each hyperlink for all pages in a site? For e.g. my site might have 10 pages, each with approx. 10 hyperlinks in it. Should I have 100 test cases each explaining where that link should redirect...

Does MSTest Have an Equivalent to NUnits TestCase

I find the TestCase feature in NUnit quite useful as a quick way to specify test parameters without needing a seperate method for each test. Is there anything similar in MSTest? [TestFixture] public class StringFormatUtilsTest { [TestCase("tttt", "")] [TestCase("", "")] [TestCase("t3a4b5", "345")] [Tes...

Ruby Test Cases

Hi, I have a task of writing some test cases on Ruby. The task is as in example: Visit the some website. (Assert that certain page was displayed) Enter a text into a textbox Press the submit button (Assert that user was redirected to a right page) (Assert that user was presented with the right information) So, the question is: how to...

Reports Test Cases

Hi Guys I am about to write test cases for SSRS/Cognos Reports,few of the test cases which can be used to test the Reports Able to login to the Source System Are we able to access the Reports which saved in Folders Are We able to execute the reports Test the SQL Test the Functionality of the Reports Test the Correctness of Reports Te...

How to export testopia test-cases?

I'd like to export testopia test cases in csv or XML format but the builtin export doesn't allow to have the full test case with steps and results, so if I have to export for someone who will do tests without an Internet connection I don't know how to do. Does someone know? Thanks, Andrea ...

How to unittest Session timeout in Django

I have a requirement something like this: As soon as the user signsup(and will be in the waiting state untill he confirms his email address), a session variable is set something like "FIRST_TIME_FREE_SESSION_EXPIRY_AGE_KEY"(sorry if the name sounds confusing!) which will be set to a datetime object adding 8hrs to the current time. Ho...

css problem: Absolutely positioned parent and float:right child stretches

In IE6, IE7 and FF2 the .outer div below is stretching out to the right edge of the document. Here is a complete test case: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <style> .outer { position:...

Selenium: Dynamic buttons and classes?

So, I was trying out a test case on a website and Selenium registers the events perfectly. Now, if I have to search for a particular class and get the innerHTML of that class, how would I do it assuming that I am using Java as the driving language? Just to be more clear. I have a class like this: <h1 class="classname">.....</h1> I...

Writing a re-usable unittest.TestCase method

I'm writing tests using the unittest package, and I want to avoid repeated code. I am going to carry out a number of tests which all require a very similar method, but with only one value different each time. A simplistic and useless example would be: class ExampleTestCase(unittest.TestCase): def test_1(self): self.assertEq...

Java: Why does this method have side effects?

I have a method that is producing side effects, even though certain variables are marked final. Why is this? Perhaps I am confused about what final does. @Test public void testSubGraph() { WeightedGraph<String, DefaultWeightedEdge> g = generateSimpleCaseGraph(); Graph<String, DefaultWeightedEdge> sub = ChooseRoot.subgraphInDirection(...