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

Change test suit to ShellSpec #133

Open
lumenpink opened this issue Mar 19, 2021 · 8 comments
Open

Change test suit to ShellSpec #133

lumenpink opened this issue Mar 19, 2021 · 8 comments

Comments

@lumenpink
Copy link

"ShellSpec is a full-featured BDD unit testing framework for dash, bash, ksh, zsh and all POSIX shells that provides first-class features such as code coverage, mocking, parameterized test, parallel execution and more."
Excerpt from https://shellspec.info/

In my experience, ShellSpec is more complete and easy to use than BATS.
And ShellSpec supports POSIX shells and not only bash.

I don't know if the project goals includes support for POSIX shells, but anyway I think is a good idea to keep this option open.

@Potherca
Copy link
Member

There is in fact an issue requesting that BPKG be rewritten in POSIX cimpliant terms. (see #90). I am very much in favor of that issue and have already done some work in the past to try to reach that goal.

I hadn't heard of ShellSpec. Usually I get a bit irked when yet another project is created to fix the same problem (i.e. unit-testing in BASH), but after reading the well-though out "Why I created ShellSpec" I am tempted to be in favor of switching over. Specifically as we do not have too many Bats tests yet, this would be the right time to do so.

@jwerle Can you pitch in as to wether you are for or against switching from Bats to ShellSpec?

@jwerle
Copy link
Member

jwerle commented Mar 24, 2021

@Potherca wow! shellspec is quite feature-full! It does look promising and indeed this is a good time to pick a framework and go. I am all for it 👍🏼

@Potherca
Copy link
Member

@lohn I'd say your motion has been seconded and carried!

@lumenpink
Copy link
Author

This makes me very happy! I really appreciate shellspec.

@francescobianco
Copy link
Member

I have looked at ShellSpec with a lot of interest, I can say that it is an impressive work, which really takes your breath away.
Not only the product but also the developer who made the big contribution has some really captivating projects:

I also think it is an excellent step to proceed with the use of ShellSpec

@Potherca
Copy link
Member

I'll leave this issue open for now, until we have documented that ShellSpec is our weapon of choice for unit-testing. (We need to create a CONTRIBUTING.md anyway, so this is another nice incentive to get that done 😏 )

@ko1nksm
Copy link
Member

ko1nksm commented Mar 26, 2021

Hello, everyone.

@lohn Thank you for suggesting ShellSpec.
@jwerle Thank you for inviting me to this great project.
After looking around at this project, I would like to join in this project.

My goal is to sublimate (POSIX-compliant) shell script into a real programming language. For this purpose, a package management system like npm for developers is essential. As long as bpkg aims to be POSIX-compliant, I will be able to help with this project.

As a demonstration, I am going to implement some tests in the project with ShellSpec. This is all I could find, but if there are others, please let me know.

@ko1nksm
Copy link
Member

ko1nksm commented Mar 28, 2021

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants