Cucumber + XCTest integration? - ruby

We have an automation framework that uses Cucumber + Appium to test an iOS application.
Appium is fine, but one of its limitations is that we need to run every test from the beginning, which slows down development. XCTest seems to offer more breakpoint type flexibility, i.e. we can just re-run a small part of the test, as we already do with browser-based applications in Selenium.
XCTest seems easy to use and powerful, and we would like to start using it as soon as possible. Has anyone managed to integrate Cucumber with XCTest? We use Ruby for our framework and would like to keep using that also if possible.
Thanks in advance!

I have recently integrated Quick(a Swift BDD framework) with the new XCTest and it all seems to be coming along fine.
As far as I know Cucumber don't have a Swift implementation yet so it is not possible to integrate Cucumber with XCTest.

Related

Cucumber Tests Framework

We are looking at cucumber for our automation test framework because everyone including business people can understand it.
We use Angualr JS frontend and Java REST backend. Our team that is going to write the step definitions likes Ruby so we want to stick with Ruby for that.
Also we would like to use Maven to tie this process into our build process.
Will cucumber be a good fit given that story above ?
Hui Peztherez, from my prospective cucumber is a great choice, using it with the same architecture expect for Angular.
We are using Maven too, and it's so useful to orchestrate them with Jenkins, using maven to run the tags..
mvn test -Dcucumber.options="--tags #smoke"
ref: https://cucumber.io/docs/reference/jvm
Also Jenkins have several plugin to report the Cucumber Analysis, so useful for testers, and in the end, we are now working about the HPQ server integration with a plugin called Bumblebee (this part is still under development for both sides, our and bumblebee)
Another good choice is Ruby, you can take the step definition so easily defined with Ruby...
We also have a integration with Selenium for the front end side, and it works as well...
So go further!
We are using Cucumber in Java with gradle in past, It was in Maven and It works fine. We have framework for UI and API, In UI we used WebDriver to write step definition and In API, We used RestAssured to write step definition. You can do same thing in Java what you can do in Ruby.
Maven for Java Cucumber :
http://mvnrepository.com/artifact/info.cukes/cucumber-java/1.2.4 - Please add other dependency as per requirement.
Jenkin Plugin : https://wiki.jenkins-ci.org/display/JENKINS/Cucumber+Reports+Plugin
Will cucumber be a good fit given that story above ?
- Yes It is good fit. I will request you to show POC(Proof of concept) to management. I had experience in past that management have no clue about BDD and they have very hard to time to understand coverage. We did very deep dive to provide all information to them. It is very important to answer following question to management
BDD report is providing accurate test converage idea to management ?
Everyone in team is able to write feature file and able to provide same quality of feature file
Feature file and BDD report will be starting tool for check test converage
Thank you.
Please be aware that Cucumber is a BDD framework that can be used on top of a browser automation framework like Selenium WebDriver/Watir/Protractor they are two distinct things. Most of them implements Selenium WebDriver's protocol.
My only concern is for you using Maven in that project setup, I know that you can run ruby code in a JVM by using JRuby. But I'm not sure which plugin you'd use to trigger that from Maven.

Selenium WebDriverBackedSelenium implementation for ruby

I'm currently working on automated testing project. I'm trying to migrate from selenium rc to selenium 2 webdriver but I want to keep the old test classes. I have searched about this and found WebDriverBackedSelenium but it seems to be only in java.
So is there any implementation out there or has anyone already implemented it?
We're working on exposing the Java WebDriverBackedSelenium as part of the Selenium Server, which will give us this functionality in all supported languages. Watch this issue.

How to setup iOS UI tests as build dependency, like OCUnit?

I'd like to add UI tests to an iOS project, in the same manner as OCUnit tests.
I know there is the Instruments + UIAutomation JavaScript approach, but I don't see how that fits into an automated build workflow. Can you setup Instruments + UIAutomation scripts as build dependency for example?
Secondly, I'd rather write the UI tests in the same language as the rest of the code...
Are there any alternatives / things I'm missing?
Thanks.
Martijn
You can actually use OCUnit for UI testing.
If you're already familiar with OCUnit, this piece of code is a good start:
How to do UI Testing of iOS Applications Using OCUnit
You can then run these tests automatically with xcodebuild. It's not straightforward, but worth the extra work. I recommend to take a look at this post: Xcode4: Running Application Tests From The Command Line in iOS
UIAutomation can also be automated now with instruments, but the fact that you can now run your UI tests with OCUnit makes it less interesting.
Have a look at FoneMonkey by Gorilla Logic. This might be what you are looking for.

Can webrat browser-automation tests be parallelised?

Is there a facility similar to SeleniumGrid that I can use to run webrat (or other, similar framework) browser automation tests in parallel across a farm of coordinated agents?
Coordinated via TeamCity with rake?
Edit: We're looking at using cucumber+webrat to do functional and acceptance testing as described in Testing ASP.NET Web Applications
I've worked on just this project actually. If you're working on rails, check out http://github.com/sgrove/spec_storm . It's only setup to run rspec + selenium tests in parallel, but it can be extended to others depending on the demand. And of course if you have any questions, I'm more than happy to help out. The more people using it, the happier I am :D

Can the Lightweight Testing Automation Framework (LTAF) be used in Continuous Integration?

I'm interested in using the Lightweight Testing Automation Framework (LTAF) to create integration tests for my web application. However, I need it to be run on the build server. Does anyone know if this can set up to do this?
There does not seem to be a whole lot of information on the web on this right now :-)
There's a blog post (Lightweight Test Automation Framework – Automated Build Support) that describes how to implement the runner as a console application, it can then be integrated into a build server fairly simply by redirecting the build output and setting the return code appropriately.
The author posted the code used in the article, you can download it from here.
I don't have experience with LTAF, but found this nice article:
First steps with Lightweight Test Automation Framework
Quoting the author (Steve Sanderson, from the comments):
Lightweight Test Automation Framework
can be invoked with query string
parameters (to specify which tests to
run) and can emit a log of the results
to a text file, so it would be
possible to integrate it. However,
this is certainly not as easy as using
Selenium RC which as you say works
through a traditional test runner.

Resources