Quick note : The example in 5.8 is not fully compatible with 5.7, especially in the CMake side of things. If you stay with 5.7, you will not been able to use at it as is.
You can find 5.7 tests in Plugin/LagrangianParticleTracker
There are both xml file and python script file are there, what’s the purpose of xml file, there is no event like “compare image” inside the xml file
They are two types of tests in ParaView, XML tests and Python Tests. There are almost completely unrelated in their usage.
there is no event like “compare image” inside the xml file
Unless specified in the CMakeLists.txt, there is an automatic visual test at the end of it.
To run this test, i need build the test first, then run by ctest?
You need to enable testing in your ParaView instalation, rebuild, then run
ctest -R NameOfTest, but this is only if you want to run this specific test. You do not need to that if you want to run tests in your own plugins.
What’s is the best way to add unit test inside paraview framework?
XML or Python tests both works. I personnaly prefere XML tests as they can be generated using ParaView interface with Tools->Record/Play test.
How to run paraview testing data: ParaViewTestingData-v5.7.0\ParaView-v5.7.0.ExternalData\SHA512? there are only files with sha512 hash code, how to use these data?
These is related to our data management system. Just enable to test and the file will be downloaded in your build/ExternalData directory. In your own plugin, you should not use this system anyway.