Solid App testing

Hi! I’m new to the community of Solid. I’m a software engineering student currently developing Viade, a route management system based on the Solid specifications, in a team. As of now, we do not have anything implemented, we will be working on the skeleton of the project in the following weeks.

The app is implemented using React. My development team and myself are new to React and Solid, and thus many questions arise because we do not know much about the inner workings of both. As for my question right now:

  • How can we test a Solid app? More concretely, how can we test API calls to a Pod, without having to setup a real Pod? Is there a way to simulate or create a mock Pod?

I know about Molid, and I have a very basic understanding of testing with Jest. But I wanted to know about the usual way of automatically testing things like a login or data accessing operations among the community members/developers.

3 Likes

For unit testing you could also consider solid-rest. It simulates a pod in local storage or file storage. But it also doesn’t provide login methods.

In solid-file-client we used it for testing, TestFolderGenerator.js takes care of providing the desired testing folder structure. It may be a bit more effort to get it running this way, but then it’s quite nice if you need lots of API calls and specific folder structures.

Solid-Rest provides Solid-like access to the local file system. This means that using Solid-auth-cli you can run nodejs or jest tests without a pod. You can’t test login but all file reading/writing can be automatically tested. We used these to create very extensive tests for Solid-file-client and you might look at those tests for examples. Hah, lol @A_A is a quicker typer than I am.

Thank you @A_A and @jeffz for these resources. I have been looking into it a bit and it seems to be what we need, so I appreciate the responses!

1 Like