Before you import a project in a Full Stack question, you should ensure it is valid. A valid project should have following:
- The project must be less than 5 MB in size.
- A hackerrank.yml configuration file in the root directory.
- The configuration should have all the required parameters.
- Follow Writing configuration file for Full Stack project to learn about writing a valid hackerrank.yml file.
- If the project has a server that needs to be exposed outside of the machine (eg a webserver), it should be running at port 8000 only. No other port is exposed outside the machine.
- The scoring command should run successfully and produce a valid output.
- Follow Scoring a Full Stack question to learn about valid scoring methods for a Full stack project.
How validation works
To ensure the imported project is valid, a validation step is run automatically when a project is imported. Here is how the validation step works:
- Step 1: Ensure the project zip is less than 5 MB in size.
- Step 2: Verify hackerrank.yml is present in the root directory of the project
- Step 3: Validate hackerrank.yml for correct format and required values
- Step 4: Start a server with the project zip and run scoring command. This step can take some time.
- Note: The scoring command once ran, should finish within 5 minutes. If the scoring command takes longer than 5 minutes, a timeout error will happen.
- Step 5: Once the scoring command has run successfully, the output is checked for a valid output.
- Step 6: If the scoring output is valid, it is checked for a valid score. If testcase weights are provided in configuration file, they are also verified in this step.
A project must clear all steps to be considered valid.