Can I run multiple versions of Google Chrome on the same machine? (Mac or Windows)

In the comments, I mentioned a step-by-step method to easily install multiple Chrome versions, side-by-side. This answer quotes my original answer, and includes a script which does the job for you. Quoted from: section 7 of Cross-browser testing: All major browsers on ONE machine: Chrome: Stand-alone installers can be downloaded from File Hippo. It is … Read more

How can I test stdin and stdout?

Use dependency injection. Coupling it with generics and monomorphism, you don’t lose any performance: use std::io::{self, BufRead, Write}; fn prompt<R, W>(mut reader: R, mut writer: W, question: &str) -> String where R: BufRead, W: Write, { write!(&mut writer, “{}”, question).expect(“Unable to write”); let mut s = String::new(); reader.read_line(&mut s).expect(“Unable to read”); s } #[test] fn … Read more

How to identify and switch to the frame in selenium webdriver when frame does not have id

driver.switchTo().frame() has multiple overloads. driver.switchTo().frame(name_or_id) Here your iframe doesn’t have id or name, so not for you. driver.switchTo().frame(index) This is the last option to choose, because using index is not stable enough as you could imagine. If this is your only iframe in the page, try driver.switchTo().frame(0) driver.switchTo().frame(iframe_element) The most common one. You locate your … Read more

What’s the difference between a mock & stub?

Foreword There are several definitions of objects, that are not real. The general term is test double. This term encompasses: dummy, fake, stub, mock. Reference According to Martin Fowler’s article: Dummy objects are passed around but never actually used. Usually they are just used to fill parameter lists. Fake objects actually have working implementations, but … Read more

What’s the difference between unit, functional, acceptance, and integration tests? [closed]

Depending on where you look, you’ll get slightly different answers. I’ve read about the subject a lot, and here’s my distillation; again, these are slightly wooly and others may disagree. Unit Tests Tests the smallest unit of functionality, typically a method/function (e.g. given a class with a particular state, calling x method on the class … Read more