[ 
https://issues.apache.org/jira/browse/SOLR-11749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16456922#comment-16456922
 ] 

Mark Miller commented on SOLR-11749:
------------------------------------

This is great that you guys are addressing this!

I wonder if trying to make ScriptUnit is the best approach though. It's been 
done a couple times before for bash at least, but I've always tried to avoid 
those projects.

Just a thought, but I wonder if it would not be better to just drive these by 
junit? If they are very long we could make some or all of them @Nightly.

What I kind of like is to make sure all of my bash scripts are setup to fail if 
any single command fails. Then a test gets its own bash scipt that just 
executes the test. If that returns non 0, we fail the junit test method.

Now, if any command fails in the Solr script, the test is failed. If anything 
fails in the test itself, the test is failed. Now you can do really simple 
assert stuff like try and list a file, if it doesn't exist the test will fail.

This gives you the same test reporting we get with our other tests, lets you do 
things like run the tests from an IDE, all of them or individually, and lets us 
treat the tests the same as our other tests for the most part with the same 
reporting. You can add an @assume to only run on the right OS for the script, 
or just an explicit check of the OS and call the right script.

It also lets us avoid almost any scripting related to a script testing 
framework. Really, all you need to do is set bash up to be easily debuggable so 
that fails show the right info, which is just a few lines of bash.

> regression-test-like functionality for bin/solr*
> ------------------------------------------------
>
>                 Key: SOLR-11749
>                 URL: https://issues.apache.org/jira/browse/SOLR-11749
>             Project: Solr
>          Issue Type: Wish
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: scripts and tools
>            Reporter: Christine Poerschke
>            Assignee: Jason Gerlowski
>            Priority: Minor
>         Attachments: SOLR-11749.patch, SOLR-11749.patch, SOLR-11749.patch, 
> SOLR-11749.patch, SOLR-11749.patch, test-output.txt
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to