There are two methods to score a full-stack question:
J-unit Test Case Based Scoring
This is the default method to score full-stack questions. In this method, there is an equal score assigned to each of the test cases. If the candidate's code satisfies each test case, then the candidate receives the full score. However, if the code satisfies certain test cases but fails some test cases, then the score obtained is proportional to the number of test cases that the code fulfils.
For instance: There are 5 test cases and the total score assigned to this particular problem is 50. If the candidate's code satisfies 3 test cases but fails the other 2 test cases, then the candidate gets 30 as the final score.
<?xml version="1.0"?> <testsuite name="Node.js (linux; U; rv:v6.9.1) AppleWebKit/537.36 (KHTML, like Gecko)" package="unit" timestamp="2017-04-12T21:08:42" id="0" hostname="2c29b2a64693" tests="8" errors="0" failures="0" time="0.29"> <properties> <property name="browser.fullName" value="Node.js (linux; U; rv:v6.9.1) AppleWebKit/537.36 (KHTML, like Gecko)"/> </properties> <testcase name="CountryList should exist" time="0" classname="unit.CountryList"/> <testcase name="Check Rendered List check number of rows that are rendered" time="0.017" classname="unit.Check Rendered List"/> <testcase name="Main should exist" time="0.001" classname="unit.Main"/> <testcase name="Check Functions check if the filter works" time="0.093" classname="unit.Check Functions"/> <testcase name="Check Functions check empty search" time="0.061" classname="unit.Check Functions"/> <testcase name="Search should exist" time="0.001" classname="unit.Search"/> <testcase name="Check Search check if search bar works (case-sensitive)" time="0.071" classname="unit.Check Search"/> <testcase name="Check Search check if search bar works (case-insensitive)" time="0.046" classname="unit.Check Search"/> <system-err/> </testsuite>
Test Anything Protocol format, abbreviated as TAP, is a commonly used unit test output format. The protocol definition can be seen at:
We support a basic version of this output.
TAP version 13 1..6 # # Create a new Board and Tile, then place # the Tile onto the board. # ok 1 - The object isa Board ok 2 - Board size is zero not ok 3 - The object is a Tile ok 4 - Get possible places to put the Tile not ok 5 - Placing the tile produces error ok 6 - Board size is 1
HackerRank for Work gives question setters the flexibility to assign custom scoring for questions. You as a question setter can specify the rules for scoring a particular question in a script. This script is an executable program or a shell command that specifies scoring rules and can be run in the Ubuntu environment. After you write the script, you must upload the script file in the full-stack test project folder. The format for custom scoring must follow the following format:
FS_SCORE:XY% where XY is a number from 1 through 100.
If you have uploaded a file for custom scoring, then you must also specify the path for scoring file while creating the test.
The candidate seems to have passed following: * create file * delete file Candidate has failed: * Modify file. FS_SCORE:60%