Testing Popups using NUnit
I'm using VS2005 and NUnit. I would like to know if there is a way to test popups using just NUnit. button1.click(); <-Find/Assert if the popup window has been opened-> ...
I'm using VS2005 and NUnit. I would like to know if there is a way to test popups using just NUnit. button1.click(); <-Find/Assert if the popup window has been opened-> ...
My current project uses SSRS as the reporting engine. I have the report executing a text command with about 10 variables passed to it. I have been looking for a solution on how to unit test (acceptance or integration, whatever, just some automation) to an SSRS report project. I thought about using this method: Move the SQL text comm...
To test inserting/update of a row, I've written a test to simulate a post, to check that it redirects, and to check that the newly inserted/updated text is on the page. The code works, but not the test - can you tell me why it's wrong? public function testEditProduct() { $request = $this->getRequest(); $request->setMethod('POST...
Has anyone seen, tried to implement, or otherwise played with TAP in shell? We're looking to create unit tests across many languages (don't get me started on why this doesn't exist so far), and since we have so much Perl code, we'll be looking at TAP (among others, I imagine). I've found a TAP library for C, Perl, of course, has it bui...
I'm a complete selenium newbie. Where should I start if I want to learn how to use it? ...
Hi, I have a simple Window with a reference to a StaticResource in the App.xaml App.xaml resource definition <!-- Standard Text Box Style --> <Style x:Key="textBoxStyleStd" TargetType="{x:Type TextBox}"> <Setter Property="FontSize" Value="14" /> </Style> Window componets using the resource <TextBlock Grid.Co...
I like the Unit test runner in ReSharper 4.5, and would like to use it with my MSTest tests, but one thing annoys me: In some of our solutions, we have set up some Deployment Items in the .testrunconfig file. The ReSharper Unit Test runner does not seem to respect this, so I get errors when trying to run the unit tests from ReSharper. ...
As noted by the question's title, what is the best way to preform unit testing on an application that behaves differently depending upon what user is currently logged in? Also, for applications that maintain information on the internal state, what is the best way to preform the testing and to manage all of the tests? ...
We have a large, multi-platform application written in C. (with a small but growing amount of C++) It has evolved over the years with many features you would expect in a large C/C++ application: #ifdef hell Large files that make it hard to isolate testable code Functions that are too complex to be easily testable Since this code is t...
Recently, I've started to working on Email2SMS feature in our product. When I joined the project this component had zero code coverage by unit-tests. Legacy code. Since I started to working on it, I was using test-first approach. But code quality was very low. It was very hard to split it and tests small chunks by unit-tests, so I decid...
I'm evaluating Cruise (NOTE! Not CruiseControl but Cruise (commercial)) for doing CI with an unmanaged MSVC++ 2008 project. I use GoogleTest framework for my unit test. I know that GTest can output its result as an JUnit XML or XML format. My question is, does Cruise support JUnit/XML format? How would Cruise know whether or not my unit...
I'm looking for tidy suggestions on how people organise their controller tests. For example, take the "add" functionality of my "Address" controller, [AcceptVerbs(HttpVerbs.Get)] public ActionResult Add() { var editAddress = new DTOEditAddress(); editAddress.Address = new Address(); editAddress.Countries = countryService.Ge...
This test fails when it is run with the NUnit console runner. It works if I run just that test with TestDriven.NET, but not if I run the entire suite with TestDriven.NET: [Test] public void BackgroundWorkerFiresRunWorkerCompleted() { var runner = new BackgroundWorker(); ManualResetEvent done = new ManualResetEvent(false); runner.R...
I have a simple CRUD operations that needs to be unit tested These test cases are for DAO layer- so all tests are against the database and hence cant be mocked. So I have one test cases for create another for update and another for read. 1) Should I hard code the data in the JUnit class or do you externalize it ? 2) The Read TestCase ...
So i have run into a problem in that we keep having complex SQL queries go out with errors. essentially this results in sending mail to the incorrect customers and other 'problems' like that. What is everyone's experience with creating SQL queries like that, essentially we are creating new cohorts of data every other week. so here ar...
One problem encountered with mutation testing is that it's slow, because by default you do a full test run (either a test file, or a suite of test files) for each mutation generated. One way to make mutation testing faster would be to stop the test run for a given mutant once a single failure has been encountered (but only during mutati...
We have a system that was originally developed decades ago and has increased in code base over the years. This is a fairly major system, with configuration that our department maintains (the vendor does not allow us access to the source or underlying database). The client software is a proprietry developed application which is basically ...
I would like to introduce unit testing to our C++ product and wanted to investigate the pros and cons of trying to use the CLR-based unit tests. I've read that if you compile with the /clr:safe option, you can call your existing C++ code. I'm strictly a .NET developer, so I'm at a loss for how this would affect our codebase. What shou...
In Zend, models are added to the view: //In a controller public function indexAction() { //Do some work and get a model $this->view->model = $model; } We can easily check that "model" exists in the view (I'm using simpletest for this): //In a unit test public function testModelIsSetInView() { //Call the controllers inde...
I have a mako template that looks something like this: % if staff: <!-- begin staff --> ... <!-- end staff --> % endif That way if I pass the staff variable as being True, those comments should appear. I'm trying to test this by using a regular expression that looks like this: re.search('<!-- begin staff -->.*<!-- end st...