Skip to content

SuffolkLITLab/ALKiln

Repository files navigation

ALKiln

ALKiln, or Assembly Line Kiln, is an open source project that helps docassemble developers create automated tests for their interviews (online forms). It works well with the Document Assembly Line Project but isn't dependent on it.

Use ALKiln

Read about how to use this framework in Assembly Line's documentation.

If you have questions or need to report a bug, start a new issue.

The following documentation is for internal developers—those working on ALKiln itself.

Our code

Our code pretends to be a human interacting with online forms (interviews) that have been made with the docassemble open source platform. It looks at the HTML DOM, manipulates it, and interacts with it.

It uses cucumber, puppeteer, and chai.

Our users

Our users are developers of online forms (interviews). Usually they're very new to coding and are unfamiliar with GitHub and with a lot of coding concepts. If they know how to code, it tends to be in Python because that's what docassemble uses. They usually don't have the resource or funding to put into learning these skills.

For example, a pro bono law firm is trying to write a form that people can use to create a restraining order. They're coding it using docassemble. Their users are already going through a hard time, and the forms make them outline their heart wrenching experiences in detail. The developers need to make sure their users don't get system errors right in the middle of that. They use our framework to run the end-to-end tests.

They do good work and we hope to give them a less code-focused way to automate their testing. They avoid having to learn Javascript, GitHub actions, and other such things.

To do that, we use cucumberjs, which uses Gherkin syntax to give a user/developer a more human-like syntax to instruct alkiln on what answers to give to the user's online form.

Contributing

Read about contributing in our CONTRIBUTING.md document. Here's a quick cheat sheet for some commands once you're up and running:

Cheat sheet

Once you've already read the contributing documentation, you can use these as quick reminders for running our internal tests.

setup before starting development of a feature/fix

Set up for the cucumber integration tests.

Add the feature branch name to your .env file:

BRANCH=42_feat_life_the_univers_and_everything

Then create the project on the server:

npm run setup

Run tests repeatedly

Run all cucumber tests that are not currently blocked by upstream changes:

npm run pass

Trigger cucumber tests with specific tags:

npm run cucumber "@tagname"

Run the unit tests:

npm run unit

Always run takedown before running setup again

If you or someone else changes the interview code in our ./docassemble directory, you have to delete the code currently on the testing server before running setup again. Also do this when you're done with the feature/fix or starting a new feature/fix.

npm run takedown