Skip to content
Samuel Kunst edited this page Jul 25, 2021 · 2 revisions

This page contains some ideas on how the project can be further developed, in particular enabling the user to run their local tests in a second Squeak image for speed improvements (i.e. Parallelization). The main idea we had is based on a principle similar to the Language Server Protocol (LSP).

How it works (in theory)

The main Squeak image which is visible to the user starts a second headless image. Within this second image a WebServer is started which allows communication between the two images.

Whenever code which is being observed by a Watcher is altered, the changes will be sent to the second image via a HttpRequest. After receiving the changes within the second image the codebase contained within this image will update to reflect the changes in the main image, in turn triggering the tests to run. When the tests have finished the results can be sent back via HttpResponse to the main image where they can be displayed as per usual.

Current state

Currently in AutoTDD-Core there is a class ATDDTestingImage which is responsible for opening a headless image and starting a WebServer within said image.

In order to try this out, run ATDDTestingImage start in a workspace.

Compatibility Issues

Windows

The ATDDTestingImage does not work on Windows due to the following 2 problems:

  • Due to a bug in the Squeak VM the second image won't start headlessly, even though it theoretically should
  • Windows has strict policies on locking working files, which will cause a permission issue when opening the second image. This can be solved by opening another image i.e. making a second image dedicated to running the ATDDTestingImage

Linux

When closing the main image, we want the second image to close as well in order to avoid zombie processes. Therefore we are sending a sigterm to the second image which should close it. The second image does receive the sigterm but for some reason does not result in closing the image. We suspect that this is a bug within the Squeak VM as well.

Perhaps this can be solved by sending a HttpRequest that closes the second image through the WebServer.

MacOS

Believe it or not, everything works on MacOS...

apple_it_just_works