I am doing some regression testing (changes to underlying database structures) where I'm lucky enough to two separate environments which should contain the same data. What I'd like to do is open a browser session in each environment and then have one browser mirror the other (ie I click on a control for example) so I can check the results between browsers without having to repeat actions in each browser. Does such a tool exist? Ideally the targetted browser is IE.
Building off of @Bruce McLeod's answer with Selenium. Using Selenium WebDriver to do what you want to do isn't terribly hard. Briefly, this is how it could be done.
Typically, web tests built around Selenium WebDriver only open one browser session and perform all operations on that session. However, there's nothing stopping you from opening up two browser sessions and performing the same operation in both sessions then comparing the results like so...
//Begin test ie = openBrowserSessionIE() chrome = openBrowserSessionChrome() ie.open(url) chrome.open(url) compareResults(ie, chrome)//non-exhaustive comparison of page elements ie.click(xpathToElement) chrome.click(xpathToElement) compareResults(ie, chrome) close(ie) close(chrome) //etc. etc.
You'll want to compare only the essential features of each page since an exhaustive search is really going to slow down your test.
There are plenty of tools that allow you to record scenarios and then play them back at any time, even changing the url that you navigate to. There are also tools that will show you the same URL in a number of different browsers. I don't know of any tool that does what you are asking though.
Would recording a scenario and playing it back be enough? Would you want it to click the exact x/y coordinates (compared to the top left of the browser window) or the same element even if located at different x/y coordinates?
If clicking the exact same coordinates would be enough you could probably write this tool fairly simply importing the mouse_event library. An example is here: http://pinvoke.net/default.aspx/user32/mouse_event.html
If you want to click the same element regardless of coordinates and you wouldn't mind playing it back (rather than seeing it happen simultaneously) you can use the Selenium IDE: http://seleniumhq.org/projects/ide/.
Clicking the same element simultaneously would be a little more work I'd imagine. You'd need to basically combine the code to record and playback from some record/playback tool such as Selenium to happen at the same time.
Whilst there is no commercial tool that could do this you could definitely "roll your own". For demo purposes I have built tools that fire up four browsers simultaneously.
The challenge though, especially with IE it that if you are doing this on the same machine then you will get "session corruption", and the browsers will be effecting each other. Some examples are:
- Logging in to one browser will most likely log in both.
- If a pop up occurs, which session created it ?
If you can live with this, I would look into using selenium, via http://selenumhq.org.