-
Notifications
You must be signed in to change notification settings - Fork 517
Road to v1.0 #196
Comments
FANTASTIC post! @ztombol: Keep up the excellent work—not just in the code, but in top-notch posts like this to rally the troops. Excellent technical writing like this is rare (probably more than it should be!), but powerful. I currently don’t have time to contribute—but if and when that changes, I will certainly sign up for this. Until then, if you’re reading this and have the time, please contribute! Bats improves life for anyone developing or using bash scripts and programs everywhere. But its benefits go beyond the borders of current bash code; all the “glue” scripts written in bash-flavored shell scripts benefit as well. Bats also makes bash a more attractive place to program, as other languages have multiple mature testing tools and frameworks at their disposal. It’s long past time that the most popular and widespread dialect of shell scripting had something similar! Let’s iron out the remaining wrinkles of bats and improve the coding hygiene of bash developers everywhere. ☻ |
(P.S.: May The Source™ be with you!) |
As an add-on to the TAPS feature request, perhaps adding a method with which to organize the tests into subtests, particularly so that they can output a TAPS-compliant subtest format? That format is something similar to
Thanks! |
@ztombol @vanosg @Sylvain303 @Zearin: As per my comment here, I'm migrating @ztombol's fantastic work here to the new repo's Road to v1.0 Project. Please direct PRs there! Thank you. I'll be turning them into Issues with assignments, etc. as well. |
@Sylvain303 Are you still interested in completing those issues but over at bats-core/bats-core? If you are, I can/will assign you to them once I recreate the relevant issue. |
@btamayo unfortunately I'm missing time. I'm interested, by those issue, #36 + #99 because I need it to complete and release an internal unit test of bats itself. But no change since many month. I saw your interest to wake up bats project, but didn't read your roadmap, yet. :) So yes… Assign them to me and touch me, so I will finally fix it. That way it will progress. Thanks for your job! |
@ztombol #89 (Empty output lines are missing from ${lines[@]}) can be marked resolved. #89 was resolved by #90 (which was merged). #92 intended to revert #90 (as #90 fixed it in a backwards incompatible way) However, #90 was never merged, so the fix (#90) is still in master. As we are prepping for 1.0, even if we decided to revert the fix, we would restore the fix for 1.0. |
#163 has now been merged over at bats-core as bats-core/bats-core#17 and #141/#142 has been transferred over to bats-core as bats-core/bats-core#19 |
What is this?
This is a list containing popular feature requests, common misconceptions and long standing bugs. All of which should be addressed on the way to
v1.0
.Not all of these will become part of Bats. Some may be rejected, some may become a footnote in the documentation, while some may be compiled into a best practice guide. What they have in common is that they are all popular and recurring topics, and so they must be addressed in some form.
You can contribute by:
All in all, this is an effort to clean-up the issue tracker as well. Also see #150.
The list
Documentation
Topics in which the documentation should be expanded.
Add an example on the proper use of
run
with piped commands.Add warning and workaround for
[[
not triggering test failure on some Bash versions.Add warning about test descriptions (i.e. function names) having to be unique.
Add link to
bats-*
helper libraries.Add detailed description of how Bats processes and executes tests.
The wiki entry is a good start, but without diving into the source, users don't understand why a
for
around a test case can't be used to programmatically generate tests, or what's the difference between doing something in global scope or setup. This should be a part of the official documentation, not just the wiki. ("I addressed this problem somewhat in Loop around tests? #136." -- @ztombol)Fixes
Bugs that should be fixed.
Empty output lines are missing from
${lines[@]}
.Use POSIX compliant options with
head
for better compatibility (e.g. Busybox support).Incorrect TAP format for skipped tests.
set -o nounset
breaksbats-exec-test
.bats-preprocess
breaks when translating a@test
line that uses tabs for white space, instead of plain spaces.Bats failing on OS X 10.11.2.
Features
Popular feature requests.
Capture standard output and standard error separately as well, in addition to the combined output.
run
variant with stdout and stderr separated #55 Separate stdout and stderr inrun
#180Running only a specific set of tests.
Tests may be selected by a regular expression matching their description.
Using numbers may be more convenient in some cases. For example, when running tests on Travis CI, Bats automatically uses TAP format output, which includes the test numbers. Using only the number of failing tests speeds up debugging and testing fixes. Tests may be specified as a list of numbers, e.g.
6,8
, number ranges1-4,10-13
, or the mixture of both, e.g.1-4,6,8,10-13
.Create and document new public variables that can be used in
teardown
to determine whether the test has succeeded, failed or has been skipped.This can be used to preserve test artefacts on failure to help debugging, e.g. what
bats-file
'stemp_del
does.This most likely involves making
BATS_TEST_COMPLETED
andBATS_TEST_SKIPPED
public.Log output or TAP output to a file.
Test files including other test files.
Per file
setup
andteardown
functions that are run only once per test file.May look something like Perl's interface.
startup
- before the first testsetup
- before every testteardown
- after every testshutdown
- after the last testStop
load <path>
from automatically appending.bash
when<path>
is relative.While files with arbitrary extension can be loaded with using the absolute path
BATS_TEST_DIRNAME
. Consistent behaviour in case of absolute and relative paths would be easier to use.load
handle free filename too #147 (similar)The text was updated successfully, but these errors were encountered: