dprice000 / LazyPI

A C# client side library for interfacing with the OSIsoft PI WebAPI
MIT License
10 stars 6 forks source link

Automate unit testing #7

Open dprice000 opened 8 years ago

dprice000 commented 8 years ago

The project is getting to a point where many pieces are completed. Some tests have been created, but there is no automated server at this time.

To add some integrity to the library, setting up an automated test would be ideal. Sadly there are not a lot of OpenSource solutions for this. Also, I do not have a good test machine for the WebAPI. The best way to test this library is to run it against the WebAPI.

pthivierge commented 8 years ago

Hello David, I have seen one of our team using https://www.appveyor.com/ at some point in time. It does continuous build and tests. if you are lucky that will work seamlessly with your project. If not, that will require a small tweaks. Everything works based on the GitHub repository, it is convenient.

On top right corner, under your avatar menu, select integration. You should see AppVeyor in there.

This should give you a quick start, there maybe other similar applications though that I am not ware of :)

dprice000 commented 8 years ago

AppVeyor looks like one of the best tools for OpenSource C# projects. One of the issues I have is that I do not have a designated test WebAPI system. I have been lucky enough to test it against live WebAPI setups, but I can not use those systems as a designated test server.

dprice000 commented 8 years ago

I'm realizing now that I can probably create Test versions of each of the Controller objects. With the test objects we can probably fake the WebAPI interactions.

pthivierge commented 8 years ago

Yes, that would work, this takes time though and needs to be maintained over time. I am wondering if there are tools to generate test objects from APIs. I just looked and I was not successful.

We are also looking into having a publicly available PI Web API, we are not there yet though ;)