Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature question - data driven testing #183

Open
QA1MTG opened this issue May 3, 2018 · 20 comments

Comments

Projects
None yet
8 participants
@QA1MTG
Copy link

commented May 3, 2018

Is there ability in the new IDE to load data from excel spreadsheets and use the values in the test?

@jesg

This comment has been minimized.

Copy link

commented May 3, 2018

i'm also interested in this feature. i'd be fine with the data being csv or json.

@corevo i can help build this feature.

@QA1MTG

This comment has been minimized.

Copy link
Author

commented May 3, 2018

Currently I have a mechanism that was built in the user-extension.js to do data driven based on loading an XML file. Since user-extension isn't available, if there's an easier way to do via Excel/CSV/Json that would be really helpful.

@corevo

This comment has been minimized.

Copy link
Member

commented May 3, 2018

This is quite challenging, the main issue is, that browser vendors (i.e. Mozilla & Google) don't let extensions access your filesystem anymore, meaning I can't read or write files unless you open them through dialog, or download them.
The problem is that if you're using a csv file, it would be a bit frustrating, having to open a dialog and navigate to it every time you open the test case.
Also since we don't have filesystem we can't reliably fetch it when it is ran from command line.

We'll have to think of a clever, and good way (in terms of ux) to do it, atm I don't have a good solution for it.

@QA1MTG

This comment has been minimized.

Copy link
Author

commented May 3, 2018

from a UX perspective, what if you added a tab next to log and had the file with the data display? maybe it's a plugin that allows you to view excel files/csv/xml?

would it be easier to have the file type be a google spreadsheet full of data? this way it's not an external file?

I could see issues if it's data that needs to be confidential

@jesg

This comment has been minimized.

Copy link

commented May 3, 2018

i'd be fine with uploading the data once and not being able to modify the data. or i'd be fine with fetching the data from a url though that seems more complicated.

for a comparison i think kantu lets the user upload a csv file.

@treg

This comment has been minimized.

Copy link

commented May 3, 2018

@jesg

This comment has been minimized.

Copy link

commented May 3, 2018

@corevo shouldn't we be able to store large blobs with the file system api (non-standard) which provides a sandboxed filesystem. or we could use indexedDB which is standard.

where does the project state get stored? i was not able to figure this out though it looks like reactjs reacts when the mutation property is modified.

@corevo

This comment has been minimized.

Copy link
Member

commented May 4, 2018

@QA1MTG I don't like that idea, it will make the IDE a spreadsheet editor as well, which will never be as good as any other product on the market today.

@treg I thought back in the day about downloading through static websites, but that would put your data at risk, as it will be public accessible, unless you host it on localhost, or we provide integration with different services.

@jesg Uploading once is a bad idea, because soon you'll forget what data was there.
fs api, is only partially available on ff, but in any case if we use either fs api or indexDB, the test case will not be portable from machine to machine.
At the end all the data needs to be stored in the side file, and I really don't want to add any more attachments to it, as it'll make it hard to maintain.

@QA1MTG

This comment has been minimized.

Copy link
Author

commented May 4, 2018

@corevo I see your point, although I was only thinking of the spreadsheet viewer to be read only data, and not an editor. Just having the ability to see the data that the test is using. Any manual updates would be in the spreadsheet and loaded again if changes are necessary.

@jesg

This comment has been minimized.

Copy link

commented May 4, 2018

@corevo i disagree with your concerns about @treg's proposal. most corporate organizations are on a vpn so this isn't as big of an issue as you are making it.

@corevo

This comment has been minimized.

Copy link
Member

commented May 4, 2018

@jesg even if you're using a vpn, the IDE isn't built for corporate organizations alone.
We needs to provide a solution that would keep the data safe, both for organizations and individuals.
Don't get me wrong, I want this feature to be implemented, but it needs to be done in a right way.
EDIT: also I'd like to support saving that info in source control if possible

@treg

This comment has been minimized.

Copy link

commented May 4, 2018

@corevo

This comment has been minimized.

Copy link
Member

commented May 4, 2018

Not exactly, any plugin built is subject to the same limitation any other extension has.
Meaning if you plan on doing that using a plugin, that plugin will face the same difficulties the IDE has.

@treg

This comment has been minimized.

Copy link

commented May 4, 2018

@corevo

This comment has been minimized.

Copy link
Member

commented May 6, 2018

We could make it work, it's not part of the current plugin system, and we have to find a way to give plugins the correct API calls to enable that.
Although I would like to find a solution that would work natively in the IDE.

@testanalyst

This comment has been minimized.

Copy link

commented Mar 29, 2019

@tourdedave Is this enhancement prioritized yet for design and development?

@tourdedave

This comment has been minimized.

Copy link
Contributor

commented Mar 31, 2019

No, but I started working on it in my spare time to demonstrate how plugins could enable this.

I have a PR that needs some work to add functionality in control flow and the plugins API (link) and I have a plugin that can be used to upload a CSV and pass it to the IDE (link). You can see a demo of it in action here.

As I mentioned, there's still work to be done. Not sure when it will land yet. I'll post here when something is available.

@myronrezzo

This comment has been minimized.

Copy link

commented Jun 2, 2019

No, but I started working on it in my spare time to demonstrate how plugins could enable this.

I have a PR that needs some work to add functionality in control flow and the plugins API (link) and I have a plugin that can be used to upload a CSV and pass it to the IDE (link). You can see a demo of it in action here.

As I mentioned, there's still work to be done. Not sure when it will land yet. I'll post here when something is available.

@tourdedave, the video just demonstrates how a plugin could work by providing the data driven capabilites to the Selenium IDE, right? The repository plugin is not yet functional, correct?

@tourdedave

This comment has been minimized.

Copy link
Contributor

commented Jun 3, 2019

@myronrezzo It's functional.

I released the plugin changes necessary for it last month. If you upload a CSV file with the file uploader, it will get parsed, its contents sent to Selenium IDE, and stored in a variable called fileContents. From there you can use forEach to iterate it.

Here's an example project file that demonstrates it: data-driven.side.zip.

@p2635

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2019

Hi @tourdedave , would you be able to send me the csv file that goes along with the project as well? Is it literally a column with username and a column for password?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.