Mathematica Unit Testing

Mathematica Unit Testing feature allows the user to easily write and run tests for his code to ensure that all its functions operate as intended. Whether you are writing a single function or an entire application, the symbolic character of the Wolfram Language lets you immediately run tests even for the smallest program snippets and see the results at any stage of the development cycle.

Project conception:

  • -- This requirement was conceived during focus groups sessions and user interviews conducted by stakeholders.
  • -- The underlying technology or the language side of it was already built in, so the main requirement here was to create the necessary UI wrappers.

While creating the UI concept, it was important to understand and empathize with the user process. Another factor that had to be kept in mind while designing was the requirement that there needs to be a 1:1 mapping between the UI and the Wolfram Language.

UX Goal:

  • -- Create End to End workflow that guides the user as he writes his Unit test program.
  • -- Create the necessary User Interface and Workflows for Unit test creation notebook.
  • -- Provide Success, Failure, and Summary messages for Unit Test results.

UX Research:

  • -- Comparative analysis of other IDE's
  • -- Competitive analysis of other languages
  • -- Content strategy
  • -- Understanding user expectations by interviewing internal users.

Using my prior research, I create a low fidelity mockup of what would possibly be the final design for the Unit Test Notebook. This mockup was then reviewed by the team and stakeholders, and the next step was to iterate on the wireframe and incorporate feedback. Several such review cycles and iterations occured before the final concept wireframe was created.

UX Goal:

  • -- Create End to End workflow for guide the user to write Unit test for their Wolfram Language Expression.
  • -- Create User interface and workflows for UNIt testing notebook creation.
  • -- Provide Success, Failure and Summary messages for Unit Test results.

The Challenges

Language vs UI
The unit testing feature existed on language side. And there were recorded instances where users were using the feature quite comfortably. However, competitive analysis suggested that having a simple Unit testing feature that would allow user to create tests and produce reports was essential. Convincing this to the stakeholders, who were adamant that Unit testing should be used via the language was a task in itself.

Template vs Toolbar
Mathematica consist of notebook which is made up cells. Each cell is computable and these computable cells can be converted into Unit testing blocks . The difficult question to answer here was whether to make the user to start from scratch or to convert the existing notebook. UX conducted a small survey among developers and QA's to see what was their opinion. Mixed reviews from the surveys resulted in user interview which gave more clarity on the way to go. The stakeholders had a wanted every notebook to have the ability to be converted in to a testing notebook.

Indicating success and failure
The visual indication of success and failure was the easy part here. However, the actions that the user should be taking after a successful or a failed test needed to sorted out.

Below are final UX deliverables

Unit test zero state

Convert notebook to testing notebook

Unit test success

Unit test failure

Summary of all test

Summary of all Tooltips