Skip to main content
All CollectionsCoding testsFor candidates
How to set up the codebase for your coding test
How to set up the codebase for your coding test

This guide walks you through how to set up the codebase for your coding test.

Anton Fenske avatar
Written by Anton Fenske
Updated over a week ago

To work with your Alva coding test, you have the options below.

Option 1: Preconfigured setup (Alva-recommended)

To save time configuring your codebase, we recommend importing one of our starter projects and working in a GitHub Codespace developer environment.

Import a starter project

Please follow the procedure described in the screenshots below to import a project starter for your coding test, which does the following behind the scenes: creates a new branch on your coding test repository, copies the project starter files, commits the changes, and pushes them to the newly created branch, which you can use as your starting point:

ℹ️ Note: To see what our starter projects include, please read this article.

Start up a GitHub Codespace

Please follow the steps described in the screenshot below to launch a new Codespace:

CleanShot 2024-02-29 at 15 07 36@2x

The process of launching a new Codespace will take a few minutes, but once it opens in a new browser tab, you're ready to start working on your task, which will require the following:

  1. Write the code that fulfills the main task objectives.

  2. Commit all your changes to your target Git branch and push them to your remote repository.

Option 2: Custom setup (Advanced use only)

This option is recommended only for candidates with prior experience working with git and a fully configured local environment with their tech stack of choice.

⚠️ Warning: The environment on GitHub Actions that is used to run automated tests every time you perform git push to your remote repository might still vary with your local setup, so environment-related incompatibility issues are still possible.

  1. Clone your coding test repository to your local machine.

  2. Create a new branch in the cloned repository.

  3. Write the code that solves the task using your IDE of choice.

  4. The two points below are mandatory to make the predefined E2E tests evaluate your app in a GitHub Actions workflow that runs whenever you push your submission to your remote repository:

    1. Update the build and start scripts in the package.json file in the root of your GitHub repository. These scripts will be used to build and start your app in the GitHub Actions workflow when you push your code to the remote repository.

    2. If your challenge involves building a backend API then you must set the port where your API listens in the apiUrl property in the cypress.config.js file in the root of your GitHub repository. Check this example.

    3. If your challenge involves building a frontend then you must update the set the port where your Frontend listens in the baseUrl property in the e2e section of the cypress.config.js file in the root of your GitHub repository. Check this example.

  5. Commit your changes and push them to your remote repository.

Did this answer your question?