Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
v0.3.0 Creating Labs for IO Tests with Compiled Binaries
Here you are setting up the evaluation for HackerRank kind of I/O equivalence testing with students submitting the compiled binary files for evaluation.
Please have your testcases, ie, inputs and outputs ready before you begin the solution setup on AutolabJS.
Name your testcases as per the following convention.
Test Number Input file name Output file name Test1 input1.txt output1.txt Test2 input2.txt output2.txt Test3 input3.txt output3.txt
Setup of a matching gitlab repository is mandatory before a lab evaluation is setup on AutolabJS. Please follow the steps given below to create and setup a lab solution on gitlab.
Login to gitlab as
lab_author. In case you have not created an account with username of
lab_authorbefore, please do so before going to the next step.
Create a gitlab repository for the lab. You can create a new gitlab repository by clicking on New Project button. After successful creation of a project repository, Gitlab creates a URL for the project.
https://autolab.bits-goa.ac.inshall have a URL of
Clone the gitlab repository onto your local machine.
$ export GIT_SSL_NO_VERIFY=1 $ git clone https://firstname.lastname@example.org/lab_author/lab1.git
This step clones the gitlab repository into lab1 directory of the present working directory.
Copy evaluation skeleton
You can copy the contents of sample directory structure in io_tests into your repository. Remove the
student_solutionsub-directory and the READMEs. A brief explanation of the contents of the directory follows.
test_cases/ ---> contains testcases to be run against submitted code /checks ---> any sample input / output text files to be used for evaluation /c ---> test cases for C language (DON'T CHANGE THIS) /cpp ---> test cases for C++ language (DON'T CHANGE THIS) /cpp14 ---> test cases for C++ 2014 language (DON'T CHANGE THIS) /python2 ---> test cases for Python2 language (DON'T CHANGE THIS) /python3 ---> test cases for Python3 language (DON'T CHANGE THIS) /java/ ---> test cases for Java language (DON'T CHANGE THIS) /setup ---> compile, execute and test-setup bash shell scripts (DON'T CHANGE THIS) compile.sh ---> script to compile the code for each test executeTest.sh ---> script to execute the code for each test Test.sh ---> script to complete the tests (calls compile.sh, executeTest.sh) (DON'T CHANGE THIS) (one script for each test case) (one language-specific sub-directory exists under test_cases) execute.sh ---> orchestrating script for one submission (DON'T CHANGE THIS) test_info.txt ---> text file containing an enumeration of all tests to be run
You may need to change the
execute.shfiles to suit your needs. If you don't need to compile the submitted code, you can keep an empty
compile.sh(do not delete this file). You can evaluate C, C++ 2011, C++ 2014, Python2, and Python3 languages.
Replace I/O Files
Delete the contents of
test_cases/checksdirectory and place your input and output text files there. These files must strictly follow the naming conventions suggested at the top of the page.
Apart from the above directory structure, when the evaluation happens three more directories are created by AutolabJS. They are:
student_solution ---> the submitted code gets copied here working_dir ---> a temporary directory used during evaluation results ---> results of evaluation are stored in this directory /log.txt ---> evaluation log is in this file /scores.txt ---> scores received for all the test cases /comments.txt ---> comments received for all the test cases
Create List of Tests
test_info.txtfrom io_tests and modify to suit your needs. Each line of
test_info.txthas two fields separated by a tab space. A sample
test_info.txtwith two tests is shown below.
Test1 1 Test2 1
The first field corresponds to name of the test and the second field corresponds to time limit to run the test. The last line ends without any new line character.
You can run as many tests as you want by placing the matching input, output files in
test_cases/checksand adding the corresponding line in
save and export the solutions to gitlab
Make a commit in the local repository and push the changes to the gitlab.
$ git add . $ git commit -m 'instructor's solutions' $ git push origin master
Follow the details provided on Manage Course page to add the lab to website.