I'd like to write some integration tests for a card game I'm creating. However, it's based on a shuffle. The only solution I can think of to get predictable results to test is stubbing the shuffle, however I'm uncomfortable doing any stubbing in an integration test. Are there any alternative strategies?
...
Hi
I have a largish application that uses MVVM. The Model is mostly in a C++ DLL. The ViewModel is in C#, and I've tied my WPF controls to the ViewModel in the usual way.
The app is ready for integration testing. I can drive tests from within the application, but I'd like to move testing out into another process so I can minimize pollu...
I am trying to run some custom SQL during the setup of my Rails integration tests to prepare a legacy database (e.g., to create its tables, create any required views, etc.), which is not part of my schema.rb (nor do any migrations for it exist).
Are there any best practices for doing so? Googling has not been very enlightening so far ;-...
Hi,
I have some initialization code to use my API. The initialization may fail and I´d like to test it in an NUnit test.
After the initialization the API may be used. I´m testing the API too, but all my test methods will use the same, common, initialization code.
What I would ideally like is if this behavior:
The Initialization test...
Is it common to write integration tests before writing unit tests? Is it conventional, a good idea, or best practice?
It just seems like a logical thing to do in my mind, especially when working with some 3rd-party API for the first time: You need to know how to use the 3rd-party software before you can test your own code for proper in...
I don't mean defer all unit-testing until an integration test passes. The unit tests I'm referring to are those that verify that the SUT interacts with the 3rd-party mystery API correctly.
The rationale for deferring these unit tests is that they verify something that is unknown. If I don't know how the 3rd-party mystery API works, ho...
What is the best way to unit test code that generates images? Say, for example, a class that generates a plot or a chart?
...
I am very new to cucumber and rspec, but do have some rails and ruby understanding.
The gems in question are: Devise, Declarative_Authorization, and role_model
Rails 3 is what I am using and ruby 1.9.2-rc2
remember I do NOT know what I am doing
I have written a Feature:
Feature: As the administrator of the site give me quick access ...
I am running an Integration Test for a Grails application. I am using the easyb plugin. The problem is that the database doesn't seem to get cleared out between Scenarios. My When I run standard Grails Integration Tests, the persistence context is cleared between each test. The easyb Stories are in the Integration folder, but the Gr...
Hi,
My web page displays the following table( in an html format, but simplified here)
Item# Item_Description Price Status
100 COOKIE $68.00 Eligible
123 RADIO $94.00 Eligible
300 DIAPERS $54.00 Returned
How do I use jwebunit to make an assertion that there is some row in this table with Item#=300 and status = "Returned"...
I'd like to know if there is any simple way of running with MSTests a certain category of tests. I currently have some Unit and Integration tests. Generally, I just want to run Unit-Tests.
I know you can tag each test method with a category, but from what I've seen it seems like it is only useful if you want to create different tests li...
We were used to running our grails integration test against in memory HSQLDB database, but at the failure point it was difficult to investigate as the data was lost. We migrated to running the test against the physical database(postgres) and all is well when the tests passes. At any point if the tests fail we want the data to be committe...
I'll keep it short, I've got a rails app which communicate with other apps, some using SOAP (non-rails apps of course...) and others with REST. I'm making integration tests to ensure that my endpoint wrapper classes have correct mappings and setup. However, they are executed by default by rake test which makes it slow and fragile. I wish...
The Silverlight Toolkit contains Unit Testing Functionality that allows to test classes such as the ViewModels in a MVVM application that invoke remote Services asynchronously.
I would like to be able to perform my ViewModel Integration Tests against the actual services instead of mocked instances.
Is there any support for asynchrono...
I am trying to test an inplace editor using Cucumber/Capybara/Selenium stack, but my problem is that the editor is activated by clicking a div and not a link or button. I can not seem to figure out how to get Capybara to do this. Is there a way of doing this?
...
I have created a custom Rails integration environment that i use to run Selenium tests. The tests run fine in this new environment, however the problem is that within the test code, the RAILS_ENV variable is set to test.
I have a test helper class which is similar to the default rails test_helper class, and defines ENV["RAILS_ENV"] = "...
Hello All,
We have a set of integration test which depend upon same set of static data. Since the amount of data is huge we dont want to set it up per test level. Is it possible to setup data at the start, run group of test and rollback the data at the end of test.
What we effectively want is the rollback at test suite level rather tha...
A JUnit book says " protected method ... this is one reason the test classes are located in the same package as the classes they are testing"
Can someone share their experience on how to organize the unit tests and integration tests (package/directory wise)?
...
Hi,
I'm trying to write a simple integration test, but having some trouble with Domain Objects. I've read on unit testing but can't figure it out.
This is my simple test:
User user = User.get(1)
controller.params.userid = "1"
controller.session.user = user
controller.save();
The error message is:
groovy.lang.Mis...
I'm extensively using Selenium for integration testing. Works great for all normal stuff (HTML/AJAX), but no go when I'm trying to test third party ActiveX, Java applets and Flash components.
The solution I've found for this is Sikuli. Works great locally, but how can I integrate that into Selenium?
btw. if that's relevant, for Seleni...