← Back to team overview

dhis2-devs-core team mailing list archive

Re: API testing..some initial results

 

Hi Jason

That looks interesting, so this would target /api/schemas only? would be
interesting to see how other parts of the API could be tested also. I have
also been looking into doing testing using Spring MVC Testing framework.

Are you thinking this could be integrated into our CI server also?

--
Morten

On Fri, Aug 28, 2015 at 12:41 PM, Jason Pickering <
jason.p.pickering@xxxxxxxxx> wrote:

> Hi Morten,
> Mark and I have been doing some brainstorming and experimentation around
> the testing of the API. This came about after some discussions in the
> experts meeting around consistency of the API across different versions .
> Mark and I were thinking what we would like to have would be a suite of
> external tests of the API, mainly for regression purposes between
> versions.  The idea being to develop tests from one version based on the
> /api/schemas (i.e. stable)  end point, and then to test these against
> another version (i.e. dev) . Mark developed some code  to develop tests
> against the schemas <https://apps.dhis2.org/demo/api/schemas.json>
> endpoint  and then we plugged this into something called pyresttest
> <https://github.com/svanoort/pyresttest>. The repo of the API test for
> DHIS2 is here <https://github.com/dhis2/dhis2-api-testing>.
>
> Interestingly, it has picked up some inconsitencies between what is in the
> schema and what is in the schema end points.
>
> Note carefully here from this link
> <https://apps.dhis2.org/dev/api/schemas/programRuleAction.json>
>  (/api/programRuleActions)
>
>
> Note that "trackedEntityAttribute" is present here.
>
> However from https://apps.dhis2.org/demo/api/schemas.json, it is missing.
>
>
> This is one type of thing we would like to pick up.
>
> We are still thinking through the best way to approach the testing and
> your thoughts would be most welcome.
>
> Regards,
> Jason
>
>

PNG image

PNG image


Follow ups

References