Skip to content

To Implement a Command Line Online Login Test using Bash Scripting on Linux.

Notifications You must be signed in to change notification settings

pksh-23514/Command-Line-Test

Repository files navigation

Command Line Test

Introduction:

Command-Line Test is a BASH Shell based tool that simulates Login-based Online Testing scenario. Initially, the User will be provided with a Sign-in option where pre-defined Users will be allowed to Login. Upon successful Login, this tool will display Questions for the particular logged-in User from existing data-base. It will also handle Error conditions like Time-out. This tool will also store Answers provided by the particulat logged-in User for future verification.

These days there are a lot of Online Test platform which enables Students to take Tests Online. They will typically have a User-interface, Backend Question Bank and Evaluation mechanism. They will also support other features like pre-defined Time per Question, Output Reports etc. The idea of this project is to simulate such an Online Test Interface using Linux Shell Scripting and Commands.

By implementing this Linux Shell Scripting Project, we make use of Shell programming constructs (eg: loops), Pattern matching commands (eg: grep, sed etc.) and File-handling (eg: permission, directories etc.) aspects during implementation.

Requirements:

Provide a prompt for the user to Sign-up and Sign-in:

  1. Sign In
    a. Take Test
    b. View Test
  2. Sign up
  3. Exit

Using sign-up user can register with a User-ID and Password:

  1. Ask for User-name. The User-name should contain only Alpha-Numeric symbols.
  2. Ask for new Password. The Password can contain any symbol in it. Accept at-least 8 characters with at-least a Number and Symbol.
  3. Ask the User to re-enter the Password again for validation.

Already Registered User can Sign-in with ID and Password:

  1. The Script should prompt for User-name and Password.
  2. The Password should be like a Shadow Password (i.e. characters shall be blank while typing).
  3. Show Error in-case the 2 Passwords mismatch.

Create Log-file:

  1. Every activity while the Script is to be Logged in test_activity.log file.
  2. Keep Date and Time along with every Activity.

Question bank:

  1. User should provide a Question Bank file along with the Script.
  2. If not, Search for a file named question_bank.txt as a Default Question Bank.

Taking a test:

  1. Should create a directory called “.TestData” in User’s Directory structure. For eg.: ECEP/LinuxSystems/Projects directory if it doesn’t exist.
  2. Create a file named “answer_file.csv” under TestData directory if it doesn’t exist.
  3. Prompt the User with Questions one by one randomly picked from the question_bank.txt file.
  4. Prompt for Questions with Multiple choice.
  5. Every Question should be Timed, say 10 seconds.
  6. On time-out, the Question should change with fresh time-out.
  7. Every answer should be stored in answer_file.csv with the Question separated by comma.
  8. The answer should be stored with Attempt time. Eg.: If I answer within 5 seconds, then my answer with 5 seconds (Attempt time) should be stored.
  9. If the User chooses one Option, the Script should show all the Questions with all Options and the Answer should be highlighted.

Time-out:

  1. The Script should Time-out if the User Input is absent for more than 10 seconds on the Main Menu.

Snapshots:

image image image image image image image image image image image image image image image

About

To Implement a Command Line Online Login Test using Bash Scripting on Linux.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages