I am writing a vim plugin and I am testing it with the Vader framework. One of the features is a diff feature. I've tested it manually and it appears to work but I would like to test it automatically using the framework. Is this realistic? How would I do it?
Related
I have inherited a Java / Maven / Cucumber project. I am fairly new to Cucumber.
Inside one of the folder I have a class like this...
import com.intuit.karate.junit4.Karate;
import org.junit.runner.RunWith;
#RunWith(Karate.class)
public class RoadsRunner {
}
Then in the same subdirectory / package I have a .feature file.
with a number of scenario's.
Feature: Check transaction
Background:
* url apiHost + '/api/v1'
* configure headers = {'X-TransactionID': '#(Math.random().toString())' }
Scenario: Get Classes
# get classes
Given path '/myUrl/classes'
And param processName = 'myProcess'
When method get
Then status 200
Question One.
I am using Eclipse. Is there a way I can debug through the test in a similar way that I would debug a Java app?
I have downloaded myself the Cucumber Eclipse plugin but can't quite figure out how to use it.
Question Two.
Without using a custom plugin to debug is there anything I can add to the scenarios to maybe print extra debug information.
thanks
The Cucumber Eclipse plugin gives you 2 things:
IDE syntax coloring / formatting support
Being able to right-click and run a Feature directly without the JUnit "runner"
Karate is Java behind the scenes so you can debug and set break-points, but it may not be as seamless as you expect. In 0.6.0 you have the option of placing a conditional break-point in Karate code that runs before / after each test step - see screen-shot.
So as you rightly called out, printing to the log might be the most effective way to work through complicated test scripts. Please refer to the print keyword - which is exactly what you are looking for.
2 more points:
the optional HTML report includes all HTTP request / response logs - which is great for troubleshooting a test.
I would love for the Karate UI (currently in alpha) to become stable sooner and be the best option for debugging, please do submit feedback and contribute if you can.
EDIT: we now have the Visual Studio Code IDE support with first-class debug support: https://github.com/intuit/karate/wiki/IDE-Support#vs-code-karate-plugin
EDIt2: If you want to debug Java code, that is possible with the new IntelliJ plugin: https://plugins.jetbrains.com/plugin/19232-karate
As per the documentation here, At this moment best way to debug Karate Steps is using Visual Studio Code for developing tests and VS Code Karate Plugin for debugging.
Visual Studio Code is Free, built on open Source and runs on all platforms including mac/linux and windows.
Please note this
The Karate UI has been retired and is not available in 0.9.5 onwards !
Use the VS Code Debug Support instead.
As per the comment by Peter Thomas, Eclipse/IntelliJ may also support debugging but I am unable to find any development there.
Can I use MPS to create a "conventional" language plugin for IntelliJ?
It looks like MPS' core feature is the transcription from a DSL to Java. However I just want to define the DSL syntax and editor to ship it as a standalone language plugin via the JetBrain plugin repository.
I am uncertain whether that is the purpose of MPS or I have to use the Grammar-Kit to create the plugin as it is described here.
Yes, MPS allows you to create IDEA plugins, just like the Grammar-Kit does. Take the MPS route, if you need any of its core features - projectional editor, modular languages or multi-stage code generator.
Vaclav
i'm wondering if it possible to use any UI testing framework (cucumber based is preferable like calabash-ios) with XCode bots CI.
I'd like to see test results inside bot stats. thanks
I would love to see a working example of cucumber tests running on Xcode bot as well. Another option is to use KIF, here is a detailed tutorial how its done:
http://www.imind.eu/mobile/2014/02/19/ios-integration-testing-on-ci/
You can actually use Cucumberish: https://github.com/Ahmed-Ali/Cucumberish
In combination with the built-in XCUI or third party frameworks like KIF.
Give it a try, it gives you the beauty of Cucumber with a native environment.
I end up with XCTest UI Framework. Here is some resource:
https://developer.apple.com/videos/play/wwdc2015-406/
Vim has alot of plugins, and it's a real versatile time tested text editor.
There are alot of tutorials on the internet on how to configure it for different development purposes and practices using vim plugins.
Eclipse comes in various distros pre-configure for use with various programming languages, and various institutions configure these IDEs and place them out for download on the internet.
Does VIM have a similar site or plugin that will configure vim for use with language X, or for purpose Y?
Though there are a couple of so-called Vim "distros" out there (mostly for modern languages like Ruby and PHP), I would recommend against it. In contrast to IDEs like Eclipse, Vim is a highly versatile and configurable editor. If you're unwilling to spend the time to investigate plugins and gradually build your own, personal configuration, Vim may not be the best editor for you. (Or just use it for basic editing tasks in its vanilla installation.)
Don't get me wrong - do look at other people's configuration (many post their .vimrc and configuration, often on GitHub); just don't copy them blindly. With a plugin manager like Pathogen (or just using Vimballs), it's very easy to try and uninstall plugins.
The best source for these is still http://www.vim.org/scripts/index.php, though many are also on GitHub, and there's even a GitHub mirror of vim.org at http://vim-scripts.org/, for use with Pathogen.
I've picked up a legacy application developed in C/C++ on Linux, using ncurses for UI. What automated testing tools are there for this environment?
Edit: I've used AutomatedQA TestComplete in the past, and this is the type of tool I'm looking for - except running on Linux, and with the ability to test Text UI apps.
I wrote something like that before. Not much docs, but you can try the code. It's written in Python and runs on Linux.
You would basically need the ANSIterm filter, and the expect module. Then you compose them into a filter. You'll likely have to start the process with the proctools module. They are all designed to work together or separately (modular).
I have considered using Rational Function Tester and TestComplete.
RFT has explicit support for testing this type of application (text-mode linux) via built-in terminal emulation.
TestComplete does not support testing Linux apps directly, but can be made to work by "testing" a COM-enabled terminal emulation program (Attachmate Reflection at this stage), and using COM from the test scripts to do screen scraping.
Have also considered using Reflection as the terminal emulator and rolling my own test framework in C# and NUnit.
Edit: "Final" solution is using Terminator (a Java terminal emulator), extending it with an RMI interface and using TestNG...
The expect tool sounds like what you need: http://linux.die.net/man/1/expect
Have a look at the free version of TETware from the Open Group. It is a full test harness based on TCL.