ui-automationcalabashcalabash-android

How to write multiple feature file and step definition file into Calabash project directory?


To write multiple feature files(.feature) and respective step definition(.rb) files for my current Calabash project directory. Here, My doubt is that

a. Do I need to create feature file manually by using text editor after default single feature file creation based on calabash cmd 'calabash-android gen'?

b. Should I use my IDE to add multiple feature file and step definition files into Project skeleton?(I'm using Visual Studio Code IDE)


Solution

  • a. For your first feature you can reuse the file that is created if you want to. After that you should create a new file for each feature you want to test. When you execute the tests you will often only execute 1 feature test at a time while developing and perhaps only from a certain line number. So having the tests split in multiple fetaures works well. You have probably read it but if not please take a look at the Github page.

    b. You can create the files any way you want to. I normally copy an existing feature file through IDE and clean it. Personally I find JetBrains Rubymine to be a really good IDE for working with Calabash.