Skip to content Skip to footer

Testing ReactJS skills

In this episode, we look at a React task, involving an interactive widget. Since it can be a lot of work to build a functional and presentable component, and many of the skills involved aren’t really related to React, the task is presented with a great deal of the boilerplate code already written. 

This allows for the automation of targeted assessment – the task specifically measures the candidate’s ability to work with React component methods, without having to worry about the HTML, CSS, or other JavaScript involved in setting it up. Not only does this provide a clearer, less noisy assessment, but it also allows the candidate to complete the assessment faster, so it won’t take as long for the results to come in.

So how does this assessment work? Great question! When running the tests, the user’s code is sent to a coderunner server, which uses a selenium browser to render the page elements. Since it actually loads the elements into the DOM (rather than just analyzing the source code), it’s possible to automate the browser to interact with the page, testing for the expected results (eg: adding a new named entry, then checking to see if the new element was successfully added to the DOM). And just like with all the other types of tasks, the results are quickly returned to the user, and presented in a nice visual format.

Since a front-end task like this involves running an automated browser to assess it, it generally takes a slightly longer time to run the tests, but it still only takes a few seconds to receive meaningful and descriptive feedback on the results.