All the work that you submitted before losing the internet connection is saved on our servers. After the internet connectivity is resumed, you can log on to the test again (if it is not past the test completion time) and resume answering the questions.
The test timer does not stop ticking when you are offline and the test ends at the scheduled time. However, you can request the recruiter who invited you to the test, to give you an extension because of the lost time. They can allot additional time for you to complete the test. They can give you a time duration extension to complete the Tests in progress as well as send you reinvites to retake a Test. However, it is best to check your computer and internet connection before taking the Test.
HackerRank only provides a platform to conduct the challenges and cannot allow you extra time to complete the test. For help regarding interview schedule, time extension, and evaluation of tests directly contact the recruiter of the concerned company.