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 selecting a tech stack before starting a coding test and working in a GitHub Codespace developer environment.
Before you start the coding test, you should see the tech stack that is set for the coding test by the hiring team as shown in the screenshot below.
ℹ️ Note: In case the hiring team has selected a particular tech stack for you to work on, you will not see an option to select a different tech stack.
Select any tech stack of your choice from the dropdown list and start the test. You should see that the boilerplate code for the coding test will begin to set up. Once it is completed, you should be redirected to the repository where you need to accept the invitation. You should see a new branch with a starter project imported.
You should see the imported boilerplate in the Alva platform and can choose to setup another project there with a different tech stack.
ℹ️ 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:
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.
This will require the following:
Write the code that fulfills the main task objectives.
Commit all your changes to your target Git branch and push them to your remote repository.
GitHub Codespace CORS issue
If you are running a full-stack project in the codespace, you might encounter CORS related issue because the backend project's port is private by default. To resolve this, make the port public by running the following command inside the codespace. Replace <PORT> with the actual port number your backend project is using.
gh codespace ports visibility <PORT>:public -c $CODESPACE_NAME
You can refer to this article for more information on how port forwarding works in Github Codespaces.
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.
While starting the coding test, start the project with ‘Setup later / Manual’ option.
⚠️ 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
Clone your coding test repository to your local machine.
Create a new branch in the cloned repository.
Write the code that solves the task using your IDE of choice.
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.
Commit your changes and push them to your remote repository.