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

Allow outer shebangs so FQL files can be used as scripts #603

Closed
ngirard opened this issue Mar 30, 2021 · 5 comments
Closed

Allow outer shebangs so FQL files can be used as scripts #603

ngirard opened this issue Mar 30, 2021 · 5 comments
Labels
status/stale Stale issue type/question Further information is requested

Comments

@ngirard
Copy link

ngirard commented Mar 30, 2021

Hey,
let me start by expressing my gratitude for your efforts into this nice project !

Correct me if I'm wrong, but I think Ferret is greatly overlooked for front-end testing of Web applications... it might bring more visibility to describe it as suitable for both web scrapping and testing, what do you think ?

Anyway, I'm intending to use it for front-end testing in my current project. What I have in mind is to write each test as a set of FQL instructions, and to organize the tests themselves as targets in a justfile file, i.e. leveraging Just which is, in a nutshell, a build automation tool with a simple syntax.

A great addition to this workflow would be the ability for Ferret to consider FQL files as scripts. This would allow my justfile to look like:

test1:
    #!/usr/bin/env ferret
    LET doc=DOCUMENT('xxxxx')
    .....

test2:
    #!/usr/bin/env ferret
    LET doc=DOCUMENT('xxxxx')
    .....

tests: test1 test2

Incidentally, Just is capable of that, so I can provide you with a link so you figure out how it was implemented -- sorry for not being able to give you an example in Go, I'm more of a rustacean.

Well, I hope you'll consider adding this feature, and in any case I'd be interested in having your thoughts about it.
Cheers !

@ziflex
Copy link
Member

ziflex commented Mar 30, 2021

Hey,

Thank you for your kind words. Indeed, you can use Ferret for UI testing and it's one of the project's goals!
You might want to look at other tool from our ecosystem - Lab. It does exactly what you are looking for!

I started working on improving our website and documentation, so there will be new articles and guides that will cover both cases - scraping and testing.

@ziflex ziflex added the type/question Further information is requested label Mar 30, 2021
@ziflex
Copy link
Member

ziflex commented Mar 30, 2021

Here and here you can find examples of how it's used.

@ziflex
Copy link
Member

ziflex commented Mar 31, 2021

I totally forgot that we do have a blog post about Lab - check it out.
Let me know if this helps or not.

@ngirard
Copy link
Author

ngirard commented Mar 31, 2021

Ha ! Great post indeed, thanks ! I skipped it when it was published because I wasn't feeling much concerned back then, then totally forgot about it...

@stale
Copy link

stale bot commented Jun 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status/stale Stale issue label Jun 2, 2021
@stale stale bot closed this as completed Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/stale Stale issue type/question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants