cucumber / common

A home for issues that are common to multiple cucumber repositories
https://cucumber.io/docs
MIT License
3.36k stars 694 forks source link

Excel -> Pickles: Bring back FIT! #775

Open aslakhellesoy opened 5 years ago

aslakhellesoy commented 5 years ago

For some calculation-heavy domains (such as finance), Excel is the tool of choice for domain experts. Ward Cunningham knew this when he designed FIT.

I want to resurrect a FIT-like experience in Cucumber:

The question is - how will this glue code look? I'm not sure the familiar step definition abstraction fits here (no pun intended). The fixture model might be just what we want.

An Excel sheet plus fixtures would be translated to pickles, and from there on Cucumber would just run the pickles. I'm not sure how well the formatter abstractions would fit :-)

What's the simplest thing we could do as an experiment?

marnen commented 5 years ago

Spreadsheets are probably the wrong tool for this, as they are for nearly everything else. I like the idea of doing something like FIT, but I tend to think that the FitNesse version of that might be more profitable to emulate.

I tend to think that a spreadsheet or other table would work best as the examples in a scenario outline, which a programmer would have to implement. So that might be a place to start.

aslakhellesoy commented 5 years ago

Spreadsheets are probably the wrong tool for this, as they are for nearly everything else

Not sure exactly what you mean by «wrong» @marnen? Excel is the tool of choice in the finance industry (and many others). People who spend their entire day in Excel is the target group here.

luke-hill commented 5 years ago

A lot of spreadsheets are just data, and don't contain any real hardcore calculations (Other than sum logic). As such asking someone to convert an .xlsx or .xls file to a .csv often yields little to no issues (I speak from a little bit of experience).

In Ruby and JS, there are very easy CSV readers which can then travel the document and load the code into an object in memory (I imagine other languages have tools too). Maybe this is a good starting point?

marnen commented 5 years ago

@aslakhellesoy:

Not sure exactly what you mean by «wrong» @marnen?

I could talk your ear off about it, but I’m not sure this is the place for it. But basically, they’re too unstructured to really be good at anything, and I think their popularity is mostly the result of the chronic failure of software companies to provide better tools to non-programmers. Anyway, my main point is that while I like the idea of FIT-like features in Cucumber, I really don’t want them to only be available with a class of tools I try to avoid. That goes double when a proprietary file format is involved.

Excel is the tool of choice in the finance industry (and many others).

I know, but they tend to use it for calculations, not the data tables I thought were the draw here.

People who spend their entire day in Excel is the target group here.

People who spend their entire day in Excel generally don’t use it in ways that would be useful here, do they? They use it as a calculator, where as you’re talking about using it as a database if I understand correctly.

@luke-hill’s suggestion of CSV seems like a sensible alternative.

aslakhellesoy commented 5 years ago

People who spend their entire day in Excel generally don’t use it in ways that would be useful here, do they? They use it as a calculator, where as you’re talking about using it as a database if I understand correctly.

Here is a very common scenario: A trader, accountant or someone else in the company has created a bunch of spreadsheets to perform critical business operations. The spreadsheets have become a victim of their own success. They do the job, but lack important features such as database integration, collaboration, version control, access control, usability etc.

So someone decides these spreadsheets need to be turned into a proper software system. The original creators become product owners, business analysts or customers, and part of their job is to specify what the new system needs to do. And be the domain experts who can explain to programmers what these crazy formulas do. The programmers will misunderstand some of this - it is inevitable.

This is where the spreadsheets become useful. They can be used as test data providers for automated tests. The spreadsheets become executable specifications.

Being able to hook spreadsheets like this directly to Cucumber would allow programmers of the new system to automatically verify if they have implemented the new system correctly. The amount of debugging, manual testing and bug fixing this reduces is significant.

Having to round-trip this to CSV would just be an annoying and unnecessary step.

The world runs on Excel, and by proividing tooling like this we can help teams migrate from Excel to a custom software solution with more ease.

I understand lots of people don't like Excel and would rather work in other tools. That's fine. This feature is not for you.

marnen commented 5 years ago

@aslakhellesoy I don’t know why the case of formula verification didn’t occur to me here. That makes total sense. Thanks.

I understand lots of people don't like Excel and would rather work in other tools. That's fine. This feature is not for you.

The Excel integration may not be relevant to me, but a FIT-like interface to Cucumber absolutely is (I’ve been quietly wishing for it for years), which is why I wanted to make sure that this wouldn’t be thought of as limited to Excel.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

marnen commented 4 years ago

I took the liberty of marking this as a “slow burner”. If that was inappropriate, feel free to revert.