testing

Static DateTime for testing

We have a DateTime Service that pulls the Database date down when we need to use a Date. Now, If I want to run a test using "Todays" Date using FitNesse, What would be the easiest way of creating a way to have (OurService).CurrentDate be static? We have a control that ads Days,Years, or Months to the current date.. and I would like to ...

Running NBehave plain text scenarious using TD.NET

Is this possible? Actually, any tips about running nbehave tests and integrating them with build server would be appreciated. Maybe there's a good alternatives? ...

Rails test fixtures vs uniqueness

In Rails, fixtures records seem to be inserted & deleted in isolation for a given model. I'd like to test having many objects/rows in one transaction, eg. to check uniqueness. How to do it? ...

able to cause an exception on webportal server after setting webbrowser's javascript to disable

(i am a software tester, not a software developer. i am testing a software developer's webportal (tomcat) / database (mysql) software) In the client webbroswer, I have to have cookies enabled (default) and javascript enabled (default) in order to log-in. I am using FF3.5.5. Once successfully logged in, I then disable the javascript s...

Prevent Rails test from deleting seed data

I am using seeds.rb to populate some State model reference data: State.create :name => 'Alabama', :abbreviation => 'AL' State.create :name => 'Alaska', :abbreviation => 'AK' # ... Although I am not using state fixtures (since it's seed data to begin with, I think it wouldn't be DRY to have to duplicate this purely for tests), the Rail...

Visual Studio Test project base directory

Hi, I want to do some interaction testing in my test project, and would like to test some xml configuration based components... How can I find the base directory of the test project in code so that I can create paths relative to it? I want to have a sub folder that contains the test xml files. Thanks EDIT: Iv used Assembly.GetExecuti...

Understanding Rails Unit Testing: Is it still a unit test if a single test tests model interdependencies?

Besides the fact that Rails incorporates the database layer into the unit tests (which then is strictly not a unit test), what if I test for model interdependencies, e.g. check if has_many/belongs_to with :dependent => :destroy really destroys the associated items or items from join models to not leave orphans around? Should such a test...

Web Application Testing Rig: What do you use? Any suggestions?

Hi guys, I have recently inherited testing responsibility on a web application. A lot of our testing is related to specific operating systems and browsers. Does anyone have suggestions on building a test rig? I am not talking about automated testing (that is a separate issue that I'm working on). This is more for confirming specific b...

Functional Testing of Authorization In Rails

I know how to run functional/integration tests in Rails, this question is about best practices. Let's say authorization is performed using four distinct user roles: basic editor admin super This means that for each action there are up to five different behaviors possible (4 roles + unauthenticated/anonymous). One approach I've taken ...

Unit testing cakephp models

So I'm having trouble with unit testing CakePHP models. Simple stuff like writing tests that my validation rules are catching errors etc. To begin with, I have a model called NewsItem. Its defined in my MySQL database using the following schema CREATE TABLE news_items ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, title VARCHAR...

What is black box testing and white box testing

I'm trying to understand one in terms of how it compares to the other. Is white box testing where you can see the code and black box testing where you don't look at the code? ...

In functional testing, should I compare all tabular data rendered in the browser with the one coming from the DB?

I'm working on a test plan for a website where some tests are taking the following path: Hit the requested URI and get the data rendered inside some table(20 rows per page). Make a database query to get the data that is supposed to be rendered in that table. Compare the 2 data row by row, they should match. Is that a correct way of d...

C++ how to test the function to make it throw an error?

The function that needs to be tested is: int hire(Payroll * p) throw(out_of_range, logic_error) { // error if no holes left if (staffcount == MAX_EMPLOYEES) throw (out_of_range("Hire: Too many employees")); // spin down holes looking for a hole. for (int i = 0; i < MAX_EMPLOYEES; ++i) { ...

How to test a Singleton class?

Hi, I am using RSpec and want to test the constructor of a Singleton class more than one time. How can I do this? Best regards ...

Equivalence Class Testing vs. Boundary Value Testing

I understand how equivalence testing works. How is it the same or different from boundary value testing? ...

Does VMWare or any other 'virtualization software' alowe you to set the amount of CPU cores?

Hello I am setting up a testing PC to help find a weired bug on a single core computer. None of the PCs in our office have single core any more. Can I use VMWare to something similar to emulate a single core PC on a multi-core computer? Can you emulate a 32Bit version of windows with VMWare on a 64bit PC? ...

trying to find a file/line for: .(eval):289: warning: don't put space before argument parentheses

So, I get this warning when I'm running my tests in ruby/RoR .(eval):289: warning: don't put space before argument parentheses I've checked every where (but obvoiusly not) and I can't find the origin of this error. The above error just pops up inbetween the unit tests ... Can someone clue me in onto how to find the location of this e...

Optimizing regression testing in a C++ environnement

In order to avoid too much testing, I would like to provide the Quality Assurance (QA) team with hints on which features have to be regression tested after a development iteration. Do you know tools that could do that on a C++ and Subversion (and visual studio) dev environment ? Details about the use case: Features would be defined by...

can someone suggest the most active software testing forum ?

can someone suggest the most active software testing forum ? ...

HTTP Caching Testing

I have a proxying system that needs to understand the HTTP Cache-Control headers. The intent is not to perform any actual caching, but to derive tuning information based on the caching characteristics of sets of HTTP requests. I'm looking for a way to test the system. I can do spot checking by pushing content from well-known websites ...