Questions tagged [rspec]

RSpec is a behavior-driven development (BDD) framework for the Ruby programming language, inspired by JBehave. It contains its own mocking framework that is fully integrated into the framework based upon JMock. The framework can be considered a domain-specific language (DSL) and resembles a natural language specification.

Filter by
Sorted by
Tagged with
1
vote
2answers
83 views

Stop page load, or visit page without waiting for full page load -Capybara

Background: A web page takes about 2+ minutes to load. Problem: I am currently automating acceptance test using Capybara, Rspec, Selenium. Visit(URL) -- waits for all the way until the page is ...
1
vote
1answer
64 views

What is the name for the 'describe it' format in testing?

This is with ruby-rspec but I have seen it for other languages too. BDD is one term but maybe that is to too general as it covers Cucumber which doesn't use this format. Example: describe "Stuff" do ...
0
votes
1answer
29 views

How can I test if a page object yml file has orphaned keys using rspec?

I like using page objects through a yaml file with name:locator pairs One problem I run into is that over time as the locators file grows, test cases are changed or removed and we end up with ...
0
votes
1answer
41 views

How can I test if a page object yml file has duplicate keys using rspec?

Given a yml file with thing1: 'thing1' thing2: 'thing2' thing3: 'first' thing3: 'second' thing4: 'thing4' thing5: 'thing5' thing5: 'thing5' thing6: 'thing6' How can I write an rspec test that fails ...
1
vote
1answer
17 views

How to provide non-technical users with better rspec output

When writing UI automation specs RSpec has a great option --format=documentation You can combine this with --dry-run and get instant tests as documentation... The only problem is that it has all ...
2
votes
1answer
84 views

What would switching from ruby rspec to minitest involve?

I see that minitest is now included in Ruby, just require the file. Replaces unittest. I'm still using rspec everywhere 'cos I came from Ruby on Rails. minitest looks just like rspec witht the ...
1
vote
1answer
599 views

Why do rspec-capybara chrome tests run headless fail on my mac and how to diagnose/fix it?

My colleague with a windows machine doesn't have this issue with the same code. All my tests that pass normally when run in chrome - fail when run headless at the point where the user presses save ...
1
vote
1answer
111 views

Why are intermittent browser automation failures hard to fix and how to overcome that?

They seem to pop up almost randomly and with varying amounts of frequency. How to avoid them and fix the ones we have?
1
vote
1answer
397 views

How to use xvfb to run my automated rspec-capybara chromedriver tests?

I read through this and I don't quite get it. If I currently run my rspec capybara tests using chromedriver, how will I change that to xvfb ? I see the examples like Xvfb :1 -screen 0 1600x1200x32 ...
2
votes
1answer
81 views

What's the 'workflow' for writing tests for existing code with zero tests?

When I search for info on testing, all I seem to find is TDD/BDD workflow: Write a test for a basic functionality Run and watch if fail Implement Run tests again Fix code if needed Rinse/repeat ...
0
votes
1answer
190 views

How do I stop my rspec capybara tests failing intermittently

The intermittent failures are hard to pin down and they can be in many different tests. Often you can see the element you are targeting in the browser but the program just doesn't seem to be in sync ...
0
votes
1answer
27 views

Running tests in chrome but just getting data;. in every browser window

My test suite (ruby, rspec, capybara) was able to run browser based feature tests before but they somehow are broken now, and none pass. This only happens on my Ubuntu machine. On other machines ...
0
votes
1answer
354 views

Are there advantages to using Capybara with RSpec + Selenium?

I want to create some front-end automation for our web application. My plan is to use RSpec as the framework and Selenium to drive the browser. I see a lot of information (blog posts) around using ...
2
votes
2answers
1k views

How can I run one spec 100 times using the command line?

We're getting intermittent failures. Hope can I run one test 100 times to see how 'stable' it is?