Unit testing at a higher level

I have an outdated code base in php, and we have several applications in python (new code base). I am trying to transfer old fragments to a new code base / language. Currently, I can only think about using regression testing (which means that someone manually looks up links, the legacy code is once processed) to check and verify the successful code porting. However, I am a big fan of unit testing and want to know if unit testing can be applied at a higher level. Therefore, my tests will sit above the php / python level and not be aware of the specifics of the level below it. For example, if PHP was processing a GET request. I have unit test code above the application level to check the responses to a GET request. Then I replace the php code with python code and perform a test break until I can succeed. I guess,that I am trying to define an interface at a higher level than the application level and use this interface for unit test. Is it possible? or am I barking the wrong tree?

+3
source share
2 answers

What you describe is absolutely correct and good tests, although not modular, but rather integration / functional / acceptance tests. However, such tests can be performed using a conventional unit testing system. However, there are tools specializing in this too.

I don't have much experience in web testing, but check out HttpUnit or FitNesse .

+2
source

Do not forget about JWebUnit

+1
source

All Articles