This post shows how you can use some basic command line utilities, and tshark, to automate regression testing of a Wireshark dissector.
Create baseline test result
for f in `ls *.pcap* | sort -f`; do echo $f; tshark -r "$f" -V; done > result.txt
This will run tshark on files in the current directory with the pcap extension, and write the output to
To test regression, use diff
diff -b result.txt <(for f in `ls *.pcap* | sort -f`; do echo $f; tshark -r "$f" -V; done)
Any output produced by the above could be a result of
A valid change - if so, update the baseline test result
A bug - create a bug report with the output
This should work on macOS, Linux, and on Windows in the Git Bash shell.