testing

Rails Testing Question

Hi, I am trying to test a functionality, which inserts few details into the DB. In the test.log, it shows the insert command that is generated and also the log messages that I have placed to show the progress and everything seems to be working fine except the actual data is not getting inserted into the DB. I am checking whether data ...

Understanding how software testing works and what to test.

Intro: I've seen lots of topics here on SO about software testing and other terms I don't understand. Problem: As a beginner developer I, unfortunately, have no idea how software testing works, not even how to test a simple function. This is a shame, but thats the truth. I also hope this question can help others beginners developers t...

TestContext is null

Pretty simple test: [TestClass] public class MyTestClass { private TestContext _testContext; protected TestContext TestContext { get { return _testContext; } set { _testContext = value; } } [TestMethod] [HostType("ASP.NET")] [UrlToTest("http://localhost/MyPage.aspx")] public void TestMyPa...

Can't find control (ASP.NET, MS TEST)

The following test: [TestClass] public class MyTestClass { private TestContext _testContext; protected TestContext TestContext { get { return _testContext; } set { _testContext = value; } } [TestMethod] [HostType("ASP.NET")] [UrlToTest("http://localhost/MyPage.aspx")] public void TestMyPa...

Testing complex entities

I've got a C# form, with various controls on it. The form controls an ongoing process, and there are many, many aspects that need to be right for the program to run correctly. Each part can be unit tested (for instance, loading some coefficients, drawing some diagnostics) but I often run into problems that are best described with an exa...

Reportlab 'LayoutError' handling and debugging.

I have been working with some complex PDF outputs with reportlab. These are generally fine but there are some cases still where I get LayoutErrors - these are usually because Flowables are too big at some point. It's proving o be pretty hard to debug these as I don't often have more information than something like this; Flowable <Table...

SQL Server and TransactionScope (with MSDTC): Sporadically can't get connection

I've written some tests for .net code that invokes calls to my SQL Server. It appears that using System.Transactions is an excellent choice for rolling back any modifications to the database that result. I'm aware that some purists would suggest that I might want to mock the database, but I'm not going down that road; this is not stric...

What resources are there for A/B split-testing in Python?

There are several A/B split testing modules/plugins for Rails. http://github.com/paulmars/seven_minute_abs http://www.bingocardcreator.com/abingo http://vanity.labnotes.org/ etc. Is there anything similar for Python? ...

Sources of video clips for testing and demoing?

In the same vein that bulk test data for databases is required for a lot of situations that preclude creating your own, I have a need for 100 to 200 video clips 10 seconds or so in length for testing (mainly html5 video testing at this point). Going out and capturing this data set is a job in itself, so I was wondering if anyone knew of...

How to develop game bot for unreal tournament?

The idea is to develop my own bot to test the game's behavioral rules, in my case I have set on using Unreal Tournament (1999 or 2004 version) as a proof of concept. Initially, I would like to test the CTF type of mode. What I set to achieve is to have a bot, preferably in Java, that is fully controllable, that is, there is no AI but mec...

Qtp, export datatable to Quality Center

I have my QTP Scripts in Test Scripts Tab and datasheets in the Attachment Tab of TestPlan of QC. I import these datasheets to Datatable (Global) of QTP and use the data in my application using the QTP Script Parameterization and then Script updates this Global Datatable with auto generated values from application. Now, the issue is whe...

StrutsTestCase test and "error" returned from Struts2 action class

Hi all, I'm trying to use StrutsTestCase for testing my Struts2 actions, but I'm getting always the "error" value back while executing the "execute()" method from the proxy. Here's the example: public void testSpike() throws Exception{ request.addHeader("param1", "param"); ActionProxy proxy = getActionProxy("/action/to/tes...

Wordpress MU 2.92 Test Suite Errors

I'm trying to run the WordPress test suite (http://svn.automattic.com/wordpress-tests/) against wordpress MU by running "php wp-test.php -v mu" on the command line, and I get a whole slew of errors related to database tables being missing: WordPress database error Table 'wordpress_test.wp_sitemeta' doesn't exist for query SELECT meta_va...

testing command line utilities

I'm looking for a way to run tests on command-line utilities written in bash, or any other language. I'd like to find a testing framework that would have statements like setup: command = 'do_awesome_thing' filename = 'testfile' args = ['--with', 'extra_win', '--file', filename] run_command command args test_output_was_...

What is the correct terminology & best practice for common fixtures between test classes?

I understand in Junit 4, @Before can be used to setup test fixtures for the test class's multiple test methods. However, in my system, there are common test objects i would like to have available for all tests. What is the most appropriate name for these objects and what is a good best practice way to store them? ...

Testing database on Android: ProviderTestCase2 or RenamingDelegatingContext?

Hi there!! I've implemented access to a database using SQLiteOpenHelper of android.database within some classes (with pattern DAO). I wrote some junit tests for these classes using a AndroidTestCase but this cause the tests to use the same database of the application. I red ProviderTestCase2 or RenamingDelegatingContext can be used to te...

How should I split up large unit tests in ruby?

I'm writing some unit tests for one of my rails models. It's a large model and in some cases I have dozens of assertions for many of the methods. I prefer using plain test/unit with rails' activesupport syntax so I have a file like this: require 'test_helper' class ItemTest < ActiveSupport::TestCase test "for_sale? should be true if c...

How to select some of test cases to compose the BAT test(build acceptance test)?

In junit test, should I create another test suite named as ExampleBAT to do this, and this test suite contains the selected test cases? Thanks. ...

How to recombine builds in TeamCity?

We have a lot of tests. I can break these up so that they run on seperate agents after an initial compile build happens, but is there a way I can recombine these results? Having 8 build configurations that all need to be green makes it hard to see if you've got one ubergreen build. Is there a way in TeamCity to recombine / join builds ...

EasyMock - how to reset mock but maintain expectations?

Is it possible to re-define specific expectations on the same instance of mock object? Say I have this test which verifies OK: List<String> foo = createMock(List.class); expect(foo.get(1)).andReturn("Wibble").once(); expect(foo.size()).andReturn(1).once(); replay(foo); System.out.println(foo.get(1)); System.out.println(foo.size()); ver...