Hi, I guess that's basically what BATS do, it uses Node to parse the test cases line by line, then executes the command using bash and captures stdout, stderr and exit-code. It further fails a test on exit-code>0 or if an assert based on output fails. Not impossible to implement in Java/Junit, but the devil is likely in the details, error handling, env vars etc. What would have been great is that the same tooling could have supported Windows.. We likely only need a subset of BATS features. Sounds like a potential POC / hackaton project..
Jan > 23. okt. 2024 kl. 23:33 skrev Christos Malliaridis <malliari...@apache.org>: > > Funny, I was currently looking for a solution to make the bats tests run on > Windows. > > I would probably prefer a JUnit approach that executes the commands with > ProcessBuilder and avoid that way additional dependencies and test > frameworks. We would also avoid having duplicate tests. > > I considered Testcontainers to run tests in parallel and for both systems on > the same machine, but I saw that Windows Containers on Windows (WCOW) are > currently not supported, and it would come with additional system > requirements like a Docker-API container runtime, which may or may not work > with our pipelines and machines. > > I haven't heard of Pester before, so I am wondering, what would the benefits > of Pester over JUnit be? > > Christos > > On 2024/10/23 20:39:46 Jan Høydahl wrote: >> Hi, >> >> We have done tons of changes to start scripts lately, but we do not have any >> automated tests like our BATS tests for Linux. >> >> So I filed https://issues.apache.org/jira/browse/SOLR-17508 with a >> suggestion to use a tool I found called "Pester" for Powershell. >> I played a bit with it and got a few steps, but not yet there. And I'm not a >> native Windows user and don't really know PowerShell well. >> So if you want to contribute to Solr, use Windows and think this sounds like >> a fun project / Proof Of Concept, feel free to give it a try. >> Perhaps you even have a better idea for a testing tool, let us know! >> >> Further discussion can be held right here and/or in the JIRA issue. >> >> Jan >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@solr.apache.org >> For additional commands, e-mail: dev-h...@solr.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@solr.apache.org > For additional commands, e-mail: dev-h...@solr.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@solr.apache.org For additional commands, e-mail: dev-h...@solr.apache.org