In the previous post in this series, I showed you how you can execute Capybara via its own session object, which means you did not have to incorporate any of the Capybara DSL into your own logic. Here I’ll do the exact opposite of that by showing you how to incorporate Capybara into your own particular logic. Then I’ll show how that segues nicely into fitting Capybara within different test runners.
Continue reading Learning Capybara, Part 2Category: Capybara
Learning Capybara, Part 1
Capybara is rapidly becoming the go-to test tool of choice among Rubyists. I will NOT be covering this tool in the context of the Rails platform. A lot of people see the Ruby test ecosystem as existing largely to support Rails and that’s simply not true. It is true that Capybara, in particular, was forged in and around a set of tools that exist largely to support testing Rails applications. What I’ll show you here is any web application can be tested using Capybara.
Continue reading Learning Capybara, Part 1Thinking and Testing with Executable Specs – Part 5
This is the fifth post in my series of using a tool that supports writing executable specifications. If this is the first post in the series you’re reading, then you are also reading the last post in the series. Which means this post will be almost totally meaningless to you. To catch up you can read parts one, two, three, and four. (Whether those make this post less meaningless is then up to you!)
Continue reading Thinking and Testing with Executable Specs – Part 5Thinking and Testing with Executable Specs – Part 4
This post is the fourth in my series regarding approaching testing when you are using an executable specification type tool. The first, second and third posts are pretty much necessary reading for this one to make any sense to you at all.
Continue reading Thinking and Testing with Executable Specs – Part 4Thinking and Testing with Executable Specs – Part 3
This post is the third in my series regarding approaching testing when you are using an executable specification type tool. This one will following on directly from the activities done in the first two posts. (I recommend reading part one and part two if you want to follow along, since these really are interconnected threads.)
Continue reading Thinking and Testing with Executable Specs – Part 3Thinking and Testing with Executable Specs – Part 2
This post is the second in my series regarding approaching testing when you are using an executable specification type tool. Assuming you want to follow along, the first post is fairly critical to understanding how the project is currently set up.
Continue reading Thinking and Testing with Executable Specs – Part 2Thinking and Testing with Executable Specs – Part 1
I’ve been doing some presentations and training sessions on using tools like Cucumber. What’s interesting about these is that in many cases people have tried to play around with the tool but have conceptual difficulties with figuring out how to get started in terms of making decisions continuing to using the tool.
As a tester, when introducing yourself to this area of practice, you might read that You’re Cuking It Wrong or that You’re Cuking It Right. It still may not be clear which you are doing. You might read about being imperative versus declarative and wonder which is for you. (Can’t I do both?) You might even come to the conclusion that Cucumber sucks.
Continue reading Thinking and Testing with Executable Specs – Part 1Starting to Tame Capybara
Capybara is one of those open source testing tools that, when you get to use it, is really nice. However, it’s new enough (or, at least, changing enough) that good documentation on it is a bit sparse when your goal is simply to get started and you don’t have a lot of supporting frameworks in place. Case in point: what if I want to test against a browser that’s displaying my web application? I’m not using Rails. I have no other automated test frameworks in place. I just need to get started as quick as possible to determine if this tool will do what I need.
I’ll show you how I started out here.
Continue reading Starting to Tame CapybaraTesting with Cucumber, Capybara and Selenium
In a prior post, I talked about using Capybara and Selenium as just a few among many tools. In a related post on using RSpec and Capybara, I brought up the possibility that “the natural language parts are, in fact, the executable code.” This was in reference to the idea of code logic expressed as natural language in RSpec but that still required actual code that sounded almost like the natural language statements. Wouldn’t it be nice if you didn’t have to write it twice? You just write it one way and then it executes? The argument then might be to just write the code, and assume the intent of the test can be explained via comments or something else. But many people really wanted to keep the focus on natural language tests.
Continue reading Testing with Cucumber, Capybara and SeleniumUsing RSpec and Capybara Without Rails
Building off of my post regarding spiking automated testing solutions, one thing I didn’t really do was show you any sort of effective coding practice there at all. In that post I was showing how to get a series of technologies working together for that old “sense of accomplishment” thing. What I want to do here is focus on using two of those technologies together — specifically, Capybara and RSpec — while also showing you how you can start to separate out bits of logic as you start thinking about how to construct automated test frameworks for testing browser-based applications.
Continue reading Using RSpec and Capybara Without RailsSpiking With Open Source Testing Tools
If you are a tester that’s charged with automating the execution of a web application, there’s a fairly good chance that you won’t be using some of the cost solutions out there like QTP or SilkTest. There’s a better than even chance that you’ll be looking at open source testing solutions. If this is your first experience with such technologies, you might find it a bit daunting. Oftentimes the one thing you won’t find is a nice concise script that will at least give you a start. Complicating this is many blogs seem to indicate various tools all interconnect in some ways, or can only be used in certain contexts, leaving you to figure out a lot of the details yourself.
For me, when I look at these tools I need to know, as quickly as possible, if (1) they work at all and (2) if I can wrap my head around how to get started in the first place. Sometimes you just need a gentle nudge in the right direction to see how the technology works. When I practice with technologies, I create little “spike” files that do just enough to show me what I need to know. Here I’ll be showing you my spikes.
Continue reading Spiking With Open Source Testing Tools