jeudi 16 février 2017

Is there a Java test framework that accepts Java Objects as parameters?

I would like to create a system written in Java that automates a process that I perform daily.

The idea is to send an HTTP post to a server after a form is submitted on my website. The server will then take the data (passed in JSON format), create a Java object with this data, and exercise the data against tests I have written.

From here, I am unsure how to proceed. Is there a testing framework that would allow me to create and pass a Java object into it? I looked online at different frameworks, but none seem to be able to do it easily.

Ideally, I would be able to do something like this within the main method:

WebsiteData data = new WebsiteData();
TestSuite suite = new TestSuite(data);
suite.runTests()

Is there a framework out there that would help me achieve this? Would I need to create my own test framework in order to do so? Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire