Cucumber feature file in an excel spreadsheet - excel

I would like to know if it is possible to have an excel spreadsheet that contains Gherkin statements and then convert it to a cucumber feature file. I have looked extensively on the internet and I have not been able to find anything related to this. I did find some forums where it is mentioned that this may not be possible. I am pretty new to cucumber and I would like to know whether it can be done. I also found that with spec-flow (cucumber for .NET) it is possible. But I am using cucumber with Java.
I would appreciate it if someone can give me some guidance regarding this.
Thank you

I haven't seen any tool that support this.
To me, it sounds like you would need a pre-process that extracts the scenarios from their storage in an Excel file.
The answer to your question, "is it possible to have an excel spreadsheet that contains Gherkin statements and then convert it to a cucumber feature file" is yes. But I am not aware of any tool. You probably have to write it yourself.

We have done one implementation where we extracted all the scenarios from JIRA tool. The scenarios were the acceptance criteria and then copied same in Feature file.
To answer your question, we have not done so far, but you may need to write a separate code for same.

Related

Semantics based code search

We have a large number of repositories. We want to implement a semantics(functionality) based code search on those repositories. Right now, we already have implemented keyword based code search in which we crawled through all the repository files and indexed them using elasticsearch. But that doesn't solve our problem as some of the repositories are poorly commented and documented, thus searching for specific codes/libraries become difficult.
So my question is: Is there any opensource libraries or any previous work done in this field which could help us index the semantics of the repository files, so that searching the code becomes easy and this would also help us in re-usability of the codes. I have found some research papers like Semantic code browsing, Semantics-based code search etc. but were of no use as there was no actual implementation given. So can you please suggest some good libraries or projects which could help me in achieving the same.
P.S:-Moreover, companies like Koders, Google, cocycles.com etc. started their code search based on functionality. But most of them have shut down their operations without giving any proper feedback, can anyone please tell me what kind of difficulties they are facing.
not sure if this is what you're looking for, but I wrote https://github.com/google/zoekt , which uses ctags-based understanding of code to improve ranking.
Take a look at insight.io
It provides semantic search and browsing

How to use data driven framework in cucumber to access external files such as excel or data base

I'd like to perform my tests using Cucumber + Excel to store my data. I don't want to keep my data stored on the procedure files. Is there a way to do this?
Yes, this is possible.
What you need to do is to implement reading the data in your step implementations.
If you are using the data from Excel to setup the system under test, then read in the steps that prepare the system.
If you are using steps for verifying the outcome, then read the Excel files in the steps you execute from your then steps.
There, at least, is one possible issue with doing it like this. It may not be easy to validate your scenarios by reading the feature file since the scenarios depend on data that may be hard to read at the same time. So while it may seem like a great idea to combine cucumber and Excel, it may not be so great.
Cucumber is a tool for automating BDD. At the core of BDD is communication between devs, tester and business people. The feature files are used for communication by describing, easy to understand and agree upon, examples. These examples might be obfuscated using the Cucumber + Excel approach.
This is a route I personally would avoid.

Sorting data from excel spreadsheets into new files

so my issue comes from the excel data I currently have which I need to convert into 4 separate forms, each with different details. The specfics don't really matter, but what I'm trying to do is code some kind of script that would do into this data and extract the stuff I need, therefore saving me tons of time copying and pasting.
The problem is, i'm not really sure where to start. I have done some research so I am familiar with csv files and I already have a pretty good grasp on java. What would be the best way to approach this problem, from what I have researched, python is very helpful at these string type manipulations, but I also know that it could be done in java using buffered reads/file writes, but I feel like that could get really clunky.
Thanks

Does a good wrapper class and/or library for open xml Excel editing exist?

I'm looking for a nice library for editing and/or generating Excel documents on our Windows server. I feel that the open xml sdk is probably the way to go, but to me the learning curve seems steep and our dev time is limited. I think that it just shouldn't be that difficult to edit an Excel document. I'm ready to reinvent the wheel, but thought it would be worthwhile to ask first whether there is a good project/library out there that wraps open xml and makes interacting with Excel easier.
In this official MS tutorial, the code that retrieves the value of a cell is dozens of lines long.
http://msdn.microsoft.com/en-us/library/bb739834.aspx?cs-save-lang=1&cs-lang=vb#ManipulateOpenXMLExcelPowerPoint_RetrievetheValueofaCellinaWorksheet
That seems incredibly unwieldy, and I'm hoping for a better interface to this functionality.
Note: I've puzzled about how to make this question more StackOverflow friendly, but I don't know of a better way.
One of the comments mentioned a wrapper library that is exactly what I've been looking for. closedxml.codeplex.com
Try SpreadsheetLight. Disclaimer: I wrote SpreadsheetLight.
And this question is possibly a duplicate of this:
OpenXML libraries (alternatives to ClosedXML)
I use Simple OOXML and it's quite neat. And free.

How to make a library I can access in VBA in Excel

I am doing a lot of similar tasks among some VBA scripts I am writing and would like to develop a library (a bunch of convenience functions using the typelib I'm working with) which I can call from all my various scripts. I am new to the VBA world and do not know how this is done and have had a surprisingly hard time trying to figure it out.
I think what I was looking for is an Add-In. Thanks everyone for your information.
Does this example help? It appears to also have a fix to a common issue when setting this up - You didn't mention which version of office - But 2003 is mentioned in that thread, so should be the fairly straight forward common case.
http://socko.wordpress.com/2008/06/01/vba-code-library/
Another option you have though it depends on the nature of your functions, is to create a COM object that you can call from your VBA scripts.
You can easily create a COM object using many languages including Delphi and VB (old style) it is also possible in .NET though a little more involved. You can then do your calculations in your COM object and even pass in the excel worksheet etc you wish to manipulate if required.
Depending on the nature of your functions this may or may not be useful.
You will need to use VB to do this. With Microsoft plug-ins to VB, you can manipulate Excel files without even opening them, much like you do now. The code will be very similar once you have the file open.
I would transfer all my code to VB and after its working like you have your VBA macros start making libraries out of the common stuff.
Lots of work, but if you really are doing a lot of this stuff, it will be great in the long run. (Job security too ;)
Check the comments here
http://www.dailydoseofexcel.com/archives/2004/10/15/code-libraries/

Resources