Machinist vs FactoryGirl - pros and cons
Hi, I'm working with factory_girl, but looking at the machinist gem. Could you tell me please - what are the pros and cons of migrating to machinist? Have you compared those libs? ...
Hi, I'm working with factory_girl, but looking at the machinist gem. Could you tell me please - what are the pros and cons of migrating to machinist? Have you compared those libs? ...
Hello All I have a web tool which when queried returns generated Java classes based upon the arguments in the URL. The classes we retrieve from the webserver change daily and we need to ensure that they still can process known inputs. Note these classes do not test the webserver, they run locally and transform xml into a custom format...
We are trying to use Fitnesse for our Functional test. Should i be mocking dependencies or should it be testing against the database? What are the Pros/Cons of either of the approach? The whole issue of testing against the DB is setting up data which is huge dependency. If we mock then is it real functional test? Thanks ...
I need to test the performance of application running on localhost as if it were in the online environment. I mean the performance test conducted by the network traffic simulation, limited bandwidth simulation, or other parameter as if it were online. could Apache Ab do the simulation? Thank u so much. ...
Is it possible in selenium to write blocking commands? I want to make a "clickAndWaitForAjax" command. It will click a button and wait until a div is filled with text from the server. It is clear to me this can be done with two commands, but can it be done with one? How? ...
I have controller methods that look like this: class TestController < ApplicationController def testAction render :json => { 'success'=>1 }.to_json end end When I load this action in the browser, I get what I expect: {"success":1} When testing with RSpec, however, response.body gives me '<html><body>You are being <a href="htt...
I am trying to ping two different networks with thread. I am able to get the response I want but I want to convert it into a test. I have the code that I have tried below but the test runner says that no tests were run. The code is below: #!/home/workspace/downloads/Python-2.6.4/python from threading import Thread import subprocess, un...
Hi, I would like to do some stress testing to a WebSocket based application. Anyone knows a tool that may help me in this task? Update: I forgot to mention, but I'm favoring open source or free tools, given that the tests I'm performing are not for production. Thanks, Luís M. Costa ...
I need to present performance test tool to management team of my company. Some of them think performance testing is not necessary for us because our customer never request or give requirement about performance to us. However one of our current big project found performance problem, responding time is very long, server down when it handl...
Here are some the commonly known practices for securing an MVC application: Encode your output Parameterize your SQL Test your search backwards and forward 1 way hash passwords Lock out accounts or limit login attempts Use code based impersonation when accessing the file system Access SQL with a locked down username Use Honey-pots or c...
I would like to know how to write unit tests for a module that is mixed into a couple of classes but don't quite know how to go about it: Do I test the instance methods by writing tests in one of the test files for a class that includes them (doesn't seem right) or can you somehow keep the tests for the included methods in a separate f...
Are there any good scripts that I could run against my Oracle database to test for SQL defects or maybe common performance issues? Edit: Everything in an Oracle database can be queried. From the PL/SQL packages, indexes and sql running stats. The performance books say look in this place and it will show some absolute values that need th...
I am doing some performance tests for the amount of time it takes to write X amount of files to a specified location. I will be comparing write speeds: 1) with a custom file system driver installed and loaded, and 2) with the file system driver not installed nor loaded. I want to test this on various machines with various OS's. Also, I ...
Hi, I wrote a small program that uses Mechanize to traverse a site. I want to write tests for it, but don't want it to actually go log onto the site every time I run the tests. I would like to mock the internet, so that when it goes to some site, it simply returns the stored results. Here is a small example, pretend my code's purpose ...
Can I replace an executable (accessed via a system call from ruby) with an executable that expects certain input and supplies the expected output in a consistent amount of time? I'm mainly operating on Mac OSX 10.6 (Snow Leopard), but I also have access to Linux and Windows. I'm using MRI ruby 1.8.7. Background: I'm looking at doing sev...
I'm new to testing, and I'm having some difficulties trying to run a functional test. I've a messages_controller, and a user_controller here. in the routes, I've defined that the users resources has_many message resources. Now I'm trying to run a simple test in the messages controller: def test_index get :index, { :user_id => 1 } ...
Hello, I am using the Zope testbrowser which has been recommended in my last question. The problem that I am facing is that I can use the getControl function to control different objects like: password, username etc. I am trying to submit the page to get to the next page but the submit button has no 'name' variable, just an 'id' variab...
Hi, I'm using fragment caching a lot and it is essential to me for good performance. However, due to the complexity of the caching I'm using, I need to offer my testers, a way to disable/enable caching as a session variable. (On a user basis only) I was thinking about implementing a cache_disabled? method, and I now check for it's valu...
I learnt that using Customizable Authencation backends philosophy, one can create a website which accepts email addresses as usernames. But after building the corresponding logic and testing that my code is working fine, I found one issue with Django's own testcases. They were failing to follow the Customizable Authencation backend philo...
I'm creating a WPF application using the Composite Application Library (CAL), aka PRISM. I'm also using MVVM (Model-View-ViewModel). To prevent background processing from blocking the UI and making it unresponsive, I want to have the view model make most work calls on a background thread. To do this, I'm using the .NET ThreadPool object...