functional-testing

Automate Testing on future only items business rules

I currently have a business object with a validation business rule, which is it can only be created for the future, tomorrow onwards, and I cannot create new items for today. I have a process, which runs the non-future business objects through some steps.. Because I have to set things up today, and test tomorrow, and when it fails, I c...

How to call a different post to a different controller in Rails Functional Test

I want to make a post request to a different controller inside my functional test which is intended for a particular controller. However the post method in ActiveController class just takes the method to be called, it doesn't take the controller name to be called. Any ideas how to invoke a different controller? ...

Testing devise with shoulda

Hello, I'm having some difficulties in testing devise with shoulda: 2) Error: test: handle :index logged as admin should redirect to Daily page. (Admin::DailyClosesControllerTest): NoMethodError: undefined method `env' for nil:NilClass devise (1.0.6) [v] lib/devise/test_helpers.rb:52:in `setup_controller_for_warden' I have this in my...

How to set RAILS_ENV variable when running Rails tests?

In both my environment.rb and test_helper.rb files I have: ENV["RAILS_ENV"] = "development" I have one functional test written, however when I run it, the script tries to connect to my database using the "test" configuration settings which are in the database.ymal file & won't connect the the database. How can I run my tests using th...

Need a push in the right direction, to write my first functional test in Rails

I've read quiet a bit of documentation over the last few days about testing in Rails, I'm sitting down to write my first real test and not 100% sure how to tie what I have learned together to achieve the following functional test (testing a controller) I need to send a GET request to a URL and pass 3 parameters (simple web-service), if...

Are you testing against Chrome?

I'm curious to know who is testing against Chrome. I am mainly because it has become my primary browser, so all development is taking place on Chrome, then i test with IE and Firefox. ...

Is JBehave a good choice for Web Service Automated Testing?

Hi All, We have a requirement at my workplace to automate the webservice testing. We have been using QTP scripts to do so. We as a team, Kind of leaning towards Jbehave as a choice. Is JBehave a good choice for web service functional testing automation? We do use Soap UI to test manually. But we are planning to automate the functional...

On Ruby on Rails, how to run ONE functional test when another one is breaking?

let's say you added a controller and action (example: story/index), and want to run a functional test by rake test:functionals and then you found that another part of the project your coworker is working on actually broke the test at an earlier place (another controller/action), before your functional test takes place. In this case, ...

tools for testing vim plugins

I'm looking for some tools for testing vim scripts. Either vim scripts that do unit/functional testing, or classes for some other library (eg Python's unittest module) that make it convenient to run vim with parameters that cause it to do some tests on its environment, and determine from the output whether or not a given test passed....

null object reference with automation enabled flex-application at preloader

Hello, We are trying to automate our flex application. After adding automation libraries to our project we get the following exception: TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.automation::AutomationManager$/addDelegates() at mx.automation::AutomationManager$/addDelegates() at mx.au...

Rails Functional test on a custom route

I have the following routes in my app: GET /admin/comments(.:format) {:controller=>"admin/comments", :action=>"index"} admin_comments POST /admin/comments(.:format) {:controller=>"admin/comments", :action=>"create"} new_admin_comment GET /admin/comments/new(.:fo...

Hudson CI node distribution / prebuild task in multi-configuration project

Hello, i'm currently setting up a small grid of hudson nodes to utilize them for distributed testing different runtime configurations of our products. Is there a way to trigger the startup of a node when a job is invoked? The build phase of the 'multi-configuration project' that i use already wants to run within the active node. Perh...

Automating XMPP server testing with multiple client instances

Hi, I'm working on a test suite for XMPP server. Currently I have implemented a client able to connect, create account, send stanzas taken from XML file, receive the reply, store it in another file and compare that with the expected output. I can create several clients, but I'm looking for concurrent operation. How do I go about makin...

Mocha Mock Carries To Another Test

I have been following the 15 TDD steps to create a Rails application guide - but have run into an issue I cannot seem to resolve. For the functional test of the WordsController, I have the following code: class WordsControllerTest < ActionController::TestCase test "should get learn" do get 'learn' assert_response :success ...

Pylons Controller Tests Don't Pass Request Params

We're trying to setup controller tests for our Pylons app. I made a very simple controller and a very simple test. The tests looks like: class TestMainController(TestController): def test_index(self): response = self.app.get(url(controller='main', action='index', var1 = '1'), params={'var2':'2'}) print response.req ...

Testing distributed system

Are there any java-based frameworks for testing distributed systems with JUnit or TestNG? For instance I have a shared resource R and two clients (CA, CB) each connected to dedicated server (SA, SB). R can be used exclusively (one client at a time). I want to make a test that checks simple scenario: SA starts up. SB starts up. CA log...

Making functional tests in Rails with Devise

After 3 years of procrastination today is the day that I start testing my Rails apps. My first step is to fix the failing tests in my Rails 3 beta4 app. My last 3 failing tests have to do with the devise gem and its authenticate_user! method in a before_filter at the top of my controller. You'd earn great karma by helping me out with t...

How To Reference External Classes in Fitnesse

I have two jar files. MyProduct.jar (The business logic) MyProductFixture.jar. (The fixture that calls the bl) The MyProductFixture.jar has a dependency on MyProduct.jar. When I try to run fitnesse calling the fixture in MyProductFixture, I get a ClassNotFoundException for a class in MyProduct.jar. Attempting to set the -classpath...

Best way to take screenshots of tests in Selenium 2?

So I need a way to take screenshots of my functional tests. Right now I'm using Selenium 2 with C# bindings. I pretty much want to take a screenshot at the end of the test to make sure the desired page is displayed. Are there any particular tools you guys know of that I can incorporate into my C# code that will trigger a screenshot? I co...

Where/what to test? Mocks, stubs, functional, unit... (in Ruby/Rails)?

Hi all, I'm trying to test a fairly large Rails app, which I probably should have been doing all along but never felt entirely comfortable with. Now I'm working on a functional test to see if a user is created successfully. Basically, I'd like to test a few things: whether the user was saved (i.e., if there's a new record in the DB) ...