Developer Guide
Table of Content
- Acknowledgements
- Common Notations In DG
- Design
- Implementation
- Product Scope
- User Stories
- Non-Function Requirements
- Glossary
- Instructions for manual testing
Acknowledgements
- Inspiration for App Idea and OOP Structure: AddressBook (Level 2)
- Inspiration for User Guide and Developer Guide: AddressBook (Level 3) [DG]
[UG] - Inspiration for Regular expression for GitHub username validation
- Regular expression for email validation
- Converting text for ConTech
- GitHub Markdown Emoji Syntax for User Guide:
- PlantUML Tutorial
Common Notations in DG
The common notations listed below will be used throughout the Developer Guide.
- Words in
UPPER_CASE
are meant to be parameters that can be supplied to the commands.- e.g. When adding a contact, in the command
add -n NAME -g GITHUB
,NAME
andGITHUB
are parameters which can be specified, such asadd -n Le Zong -g lezongmun
. - e.g. When viewing a contact’s details, in the command
view INDEX
,INDEX
is a number (integer) representing the contact’s index in the ConTech book which can be specified, such asview 2
.
- e.g. When adding a contact, in the command
- Items in curly braces
{}
are optional. - Items in angle braces
<>
are mandatory.- e.g. When specified in the format
<-n> <NAME> {-g <GITHUB>}
, it means that:- The
-n
flag andNAME
detail are mandatory fields, without which the command would not execute. - The
-g
flag is optional, however, if used, aGITHUB
detail would have to be specified.
- The
- e.g. When specified in the format
- Items specified with a pipe
|
denote an either-or field.- e.g. For
{-n | -g | -l | -te | -tw | -e}
, only up to oneflag
is allowed, but there are six choices.
- e.g. For
Design
System Architecture
The above System Architecture diagram shows the high-level design of ConTech.
On launch, the Main
class initialises the app components in the correct sequence and links them up
with each other, in the correct sequence.
ConTech comprises five main components, namely:
TextUi
: Command Line User Interface of ConTech.MainParser
: Parser to parser user inputs fromTextUi
forCommand
.Command
: Command to be executed upon input parsing.ContactList
: Data structure to storeContact
s while running ConTech.Storage
: Reads from and writes toLocalStorage
.
How the architecture components interact with each other
The five main components interact with each other, as shown in the sequence diagram below
for the example: view 2
TextUi
The TextUi
component is responsible for displaying all outputs to the Command Line User Interface. After a user’s input
has been processed and ConTech has performed its commands depending on the input, in order to output the results of the
commands, a relevant method in the TextUi
class will be called.
Methods for printing error messages have been separated
from the main feature outputs. These methods have been placed in the ExceptionTextUi
class within the same ui
package
as TextUi
.
MainParser
The MainParser
component is responsible for making sense of the user’s inputs. It functions as the
not only the identifier for commands, but also calls its relevant sub-parsers to further destructure
the inputs, allowing ConTech to perform its commands.
The diagram below shows a sequence diagram of how MainParser
works, and a reference diagram is used
to indicate that further parsing is done by sub-parsers for each different command type. This reference diagram
will be referred to later on.
Command
The Command
component represents a collection of classes with their names in the form of XYZCommand
. The XYZCommand
classes are executed in ConTech.java
by calling on their corresponding execute()
function.
ContactList
The ContactList
component contains all the contacts stored in an arraylist. It deals with operations that interact with
the contacts in the ContactList
, such as adding or editing contacts. The contacts stored in the ContactList
are sorted
according to their names in alphabetical order.
Storage
The Storage
component consists of the Storage
, ContactsDecoder
, and ContactsEncoder
. This component is
responsible for interacting with the user’s local storage files. The user’s contacts data and personal contact data
are stored locally inside the file paths, data/contacts.txt
and data/me.txt
.
Firstly, the Storage
class checks if the user has existing data, or if they are first time users. Next, it will
make use of the ContactsDecoder
class to decode the storage file and load the contacts into the ContactList
as
Contacts
. After every command execution, to ensure data integrity, the Contacts
in the ContactList
will be
saved using the ContactsEncoder
class.
As the Storage
component is also responsible for loading these data into their corresponding ContactList
and
Contact
objects, it is dependent on the classes, ContactList
and Contact
.
Implementation
Supported Contact Details
The currently supported contact details are provided in the table below:
Flag | Detail of contact |
---|---|
-n |
Name |
-g |
Github username |
-l |
LinkedIn handle |
-te |
Telegram handle |
-tw |
Twitter handle |
-e |
Adding a contact: add
This feature is processed using AddContactCommand
. This feature allows a user to add a contact to their contact list.
The user is able to add a contact by entering a command in the form of add <-n> <NAME> {-g <GITHUB>} {-l <LINKEDIN>}
{-te <TELEGRAM>} {-tw <TWITTER>} {-e <EMAIL>}
.
The user’s input is parsed in MainParser
and AddContactParser
, the latter which inherits ContactParser
.
ContactParser
inherits RegexParser
(for regex checks regarding each detail) and implements the ContactDetails
interface (which uniquely allows the parsers to easily identify each detail based on their indexes). The class
diagram for this is displayed below.
As the contacts are identified by their names, the name field is made compulsory at the MainParser
level.
The diagram below shows the process of parsing the user’s input.
Upon parsing the user’s input, the details are passed to an AddContactCommand
, and this command will be
executed in ConTech
. The sequence diagram below illustrates the process of executing AddContactCommand
.
Viewing a contact: view
This feature is processed using ViewContactCommand
. Whenever a user wants to view a specific contact from the
contact list, user can input view INDEX
with the index of the desired contact displayed from the ls
feature.
ViewContactCommand
is then created in the MainParser
and executed in ConTech
after parsing for the index
of the desired contact.
If the INDEX
is input as me
, it will be equivalent to the contactIndex
being -1
in which case the personal
details of the user will be printed by calling the viewPersonalContactMessage
method in TextUi
. If the INDEX
is
missing, it will be equivalent to the contactIndex
being -2
in which case the error message to notify the user that
the index is missing will be printed by calling the missingIndexMessage
method in ExceptionTextUi
. Lastly, if the
INDEX
is within range and valid, the contact will be retrieved by calling the getContactAtIndex
method in
ContactList
which will return the Contact
and store it as viewingContact
in ViewContactCommand
. To print out
the contact, the viewContactMessage
method in TextUi
will be called. The sequence diagram below illustrates the
process of viewing a contact.
Editing a contact: edit
This feature is processed using EditContactCommand
. This feature allows the user to edit a contact in their contact
list, by entering a command in the form edit <INDEX> {-n <NAME>} {-g <GITHUB>} {-l <LINKEDIN>} {-te <TELEGRAM>}
{-tw <TWITTER>} {-e <EMAIL>}
. At least one detail must be specified by the user for the command to be valid. The user
can also specify me
as an index to edit the personal contact’s details.
The user’s input is parsed in MainParser
and EditContactParser
and the implementation is similar to that of
AddContactParser
.
The user input will be parsed by EditContactParser
methods getIndexToStore
and
parseContactDetails
to obtain a String array with the details to be edited.
The user input will also be parsed by the IndexParser
to obtain the contact index, which identifies the contact in the
contact list to be edited.The sequence diagram below shows how the String array is obtained.
Once the user’s input is parsed and the index specified is obtained, an EditContactCommand
with the specified
parameters will then be created and executed in ConTech
. The sequence diagram below depicts the execution of
EditContactCommand
for the index me
as well as an invalid index all
.
If a valid contact index in the contact book is specified, the details to be edited will first be checked against the
contact book for duplicates. If there are duplicates, ConTech will prompt the user for confirmation before editing the
contact. If the user accepts or there are no duplicates, the EditContactCommand
will be executed. The sequence diagram
below depicts the execution of EditContactCommand
for a contact in the contact list.
Deleting contacts: rm
This feature is processed using the DeleteContactCommand
. Users can delete a specified contact, delete all contacts at
once or delete specific details of a selected contact. In order to determine which contact or which
contact’s fields to delete, the user input is parsed using the IndexParser
to obtain the contact
index for executing the command. The user input is also parsed using DeleteContactParser
to obtain the specific fields
to be deleted, if any.
A DeleteContactCommand
with the specified parameters will then be created in the MainParser
and executed inConTech
.
To delete all contacts, a user must enter the command rm all
.
The sequence diagram below shows how the removal of all contacts works. Before any deletion, the user will be prompted with a message to confirm deletion. If the user confirms deletion for all contacts, deletion will be executed, along with a message to show that deletion has been executed. If user cancels deletion, a message is printed to show that the deletion has been cancelled.
To delete a selected contact, a user must enter a command in the form rm <INDEX>
.
The sequence diagram below shows how the removal of the selected contact works. Before any deletion, details of the
contact with the specifiedINDEX
will be displayed to the user, along with a prompt to confirm deletion. If the user
confirms deletion, deletion of the selected contact will be executed, along with a message to show that deletion has
been executed. If user cancels deletion, a message is printed to show that the deletion has been cancelled.
To delete specific details of a selected contact, a user must enter a command in the form rm <INDEX> {-g} {-l} {-te}
{-tw} {-e}
.
The sequence diagram below shows how the removal of a contact’s fields works. Before any deletion, details of the contact fields specified will be displayed to the user, along with a prompt to confirm deletion. If the user confirms deletion, deletion of the selected contact will be executed, along with a message to show that deletion has been executed. If user cancels, deletion, a message is printed to show that the deletion has been cancelled.
Searching a contact: search
This feature is processed using SearchContactParser
under MainParser
. In order to edit a contact in the contact list,
a user must enter a command in the form search {-n | -g | -l | -te | -tw | -e} <SEARCH QUERY>
. If no flag is specified,
the search will be done on contact names buy default.
From the user input, the search query and the search flag are obtained from the parseSearchQuery
and the getDetailFlag
methods respectively. The sequence diagram below shows how the required parameters are obtained.
A SearchContactCommand
with the specified parameters will then be created and executed in ConTech
. The sequence
diagram below shows how the SearchContactCommand
is executed.
Listing all contacts: ls
This feature is processed under ListContactsCommand
. The feature allows the user to list all their stored contacts
in an easy to understand manner, by entering the command ls
. The output is the names of all the contacts stored
with their respective indexes.
The user’s input is parsed in MainParser
which invokes the execute
method in ListContactsCommand
. The sequence
diagram below shows the series of steps to obtain and print all the contacts.
The execute
method gets the list size from ConatactList
class using the getListSize
method.
If the contactListSize
is 0
it prints an error message from the TextUI
class using the method
contactsEmptyListMessage
.
If the list is not empty the method listAllContacts
uses a loop to get the Contact
object at
every available index and print it using the printContactWithIndex
method in TextUi
class.
Importing contacts: import
This feature is processed using the ImportContactCommand
. This feature allows a user to import contacts over from
a text file containing comma-separated values (CSV).
As inputs may be corrupted (having less fields than required), or may not adhere to the detail formats of each field
(such as having illegal characters in the Github username), a ContactsDecoder
is used to read and ensure the data
integrity of imported contacts. To achieve this, the ContactsDecoder
class inherits the RegexParser
abstract
class, as depicted below.
With this implementation in place, the ImportContactCommand
will firstly check if there exists a file import.txt
stored in the data/
directory (ie. stored in data/import.txt
). Should the import.txt
file exist, it will then
attempt to import the contacts to a temporary ContactList
, before adding them to the user’s ContactList
. The
sequence diagram below illustrates the process of executing ImportContactCommand
.
Throughout the process of importing contacts, the alphabetical ordering of contacts is preserved.
Coming soon: import
currently does not support duplicate checks. This will be implemented
in future revisions to the application. Currently,
Current implementation ideas include:
- import all with/without duplicates (use flag to specify)
- manually check every single duplicate (inefficient, but can be an option with flag for users who want to check every duplicate)
- allow Windows-style duplicate handling (Ignore, Ignore all, Cancel)
- summarise every single duplicate and give user a one time confirmation to add/discard (no granularity)
Index Parser
The Index Parser is used when the user enters a command that specifies a contact index, such as the rm
,
view
or edit
command. The Index Parser will parse the user’s input string, and return the
specified contact index given as an integer, which will then be used in the execution of the corresponding command.
For example, if edit 2 -n Marcus Bobo
is given as the input, the Index Parser will identify the contact index to be 2
and pass the contact index to the execution of the edit
command accordingly.
Design Considerations
Aspect: Implementation of removing fields of a contact
-
Alternative 1: Implement under
edit
feature
Specify empty flags while using theedit
command and the program would delete those fields from the contact
Example :edit 2 -n Jim -e -g
would change the name field for contact and would remove the email and github field from the contact.- Pros: Editing and removing fields can be done in one step.
- Cons: Difficult to implement and makes the program more error-prone as flag descriptions can now be empty.
-
Alternative 2 (current choice): Implement under
rm
feature
Specify flags while using therm
command and the program would delete those fields from the contact
Example :rm 2 -e -g
would remove the email and github field from the contact at index 2.- Pros: Easy to implement as rm is a much simpler feature which only takes an index. Much easier exception handling also and thus less error-prone.
- Cons: Less user intuitive and takes two steps when the user wants to edit a contact and also delete fields
Product scope
Target user profile
- Has a need to store a significant amount of computing-related contacts
- Prefers and is familiar with Command Line Interface (CLI) applications
- Has many contacts that use common computing platforms, such as: Github, Linkedin, Twitter, Telegram, and Email
- Can type fast and prefers typing to mouse interactions
Value proposition
As computing professionals are often on their computer, ConTech allows them to have a platform to manage their computing-related contacts locally and efficiently, without the need to use additional devices or platforms.
User Stories
Version | As a … | I want to … | So that I can … |
---|---|---|---|
v1.0 | programmer | add my colleague’s account usernames | easily access it |
v1.0 | programmer | edit my colleague’s account usernames | update it if there is a change |
v1.0 | programmer | save contact data locally on my hard drive | access it without internet |
v1.0 | programmer | view various contact details of my colleague | contact him easily on different platforms |
v1.0 | programmer | see the names and index of saved contacts | know the contacts I have saved |
v1.0 | programmer | delete a specific contact | |
v1.0 | programmer | be able to copy and paste the displayed contact’s URLs | visit the contact’s accounts |
v2.0 | programmer | save my personal details | the application is aware of the user |
v2.0 | forgetful user | be able to search for my contacts by name | find their contact details |
v2.0 | programmer | import a list of contacts quickly from an input txt file | save time typing each contact |
Non-Functional Requirements
- App should work on any mainstream Operating Systems as long as Java
11
or higher has been installed on it - App should be easily usable by a novice who does not have much CLI experience
- Format of details of contacts should follow requirements stated by Github, LinkedIn, Telegram, Twitter, and general Emails
- Importing hundreds of contacts should be instantaneous
Glossary
- Mainstream Operating Systems - Windows, macOS, *NIX
- LocalStorage - Refers to user’s hard disk storage
Instructions for manual testing
Given below are instructions to test the app manually.
Note: These instructions only provide a starting point for testers to work on; testers are expected to do more exploratory testing.
Launch and Shutdown
- Initial launch
- Ensure that you have Java
11
or above installed in your Computer. - Download the latest version of
contech.jar
from here. - Copy the
contech.jar
file to the folder you want to use as the home folder for ConTech. - Open your desired Command Line Interface from the folder with
contech.jar
and enter the following code:java -jar contech.jar
.
- Ensure that you have Java
- First time user
- For a first time user, you would be required to type in your personal details.
- Entering your name will be mandatory. The other 5 fields (GitHub, Telegram, Twitter, Email and LinkedIn) are optional. You will be prompted to enter each detail accordingly. For the optional fields, you can press ENTER to skip.
- Regular user
- For regular users, ConTech will simply greet you and you are ready to input your command.
Expected:
____________________________________________________________ Hello, John. Welcome back to ConTech, your personal contact tracker. ____________________________________________________________
- For regular users, ConTech will simply greet you and you are ready to input your command.
Expected:
- Shutting down ConTech
- Once you are done with your tasks and would like to shutdown ConTech, simply input
exit
. - Test case:
exit
Expected:____________________________________________________________ ConTech will now shutdown. We hope you have enjoyed using it. ____________________________________________________________
- Once you are done with your tasks and would like to shutdown ConTech, simply input
Adding a contact
- Adding a contact with all fields
- Test case:
add -n Alex Lee -g alexlee -te alexlee -tw alexl33 -e alex.lee@email.com -l alexlee
Expected: New contact will have all fields added. Each field will be displayed after it has been added to the contact list.____________________________________________________________ ConTech has added the specified contact: Name: Alex Lee Github: github.com/alexlee Email: alex.lee@email.com Telegram: t.me/alexlee LinkedIn: linkedin.com/in/alexlee Twitter: twitter.com/alexl33 You now have 1 contact(s). ____________________________________________________________
- Test case:
- Adding a contact with fewer fields
- Test case:
add -n Jake Tan -g tanjakey -e jakeytan@email.com
Expected: New contact will only have the fields mentioned added to the contact. Each field that is field will be displayed after it has been added to the contact list.____________________________________________________________ ConTech has added the specified contact: Name: Jake Tan Github: github.com/tanjakey Email: jakeytan@email.com You now have 1 contact(s). ____________________________________________________________
- Test case:
- Adding a contact with no field entered
- Test case:
add
Expected: An error message will notify user that there are missing parameters.____________________________________________________________ There seems to be missing parameters in your request. Please enter command in this format: add -n <NAME> {-g <GITHUB>} {-e <EMAIL>} {-te <TELEGRAM>} {-l <LINKEDIN>} {-tw <TWITTER>} example : add -n John Doe -g johndoecoder -e john@email.com -te johndoe NOTE : At least NAME required Order of parameters do not matter ____________________________________________________________
- Test case:
- Adding a contact with duplicates
- Prerequisites: A contact with similar either similar name or details must already be in the contact list. For
simplicity, we will re-use the same command from
1
. - Test case:
add -n Alex Lee -g alexlee -te alexlee -tw alexl33 -e alex.lee@email.com -l alexlee
Expected: ConTech will display a list of contacts that are already in your contact list with the same fields as the one you are adding. It will then ask for your confirmation whether you would still like to add the contact or ignore it.____________________________________________________________ One of your saved contacts has a duplicate field: 0. Name: Alex Lee Github: github.com/alexlee Email: alex.lee@email.com Telegram: t.me/alexlee LinkedIn: linkedin.com/in/alexlee Twitter: twitter.com/alexl33 Do you still want to add the contact? (y/n) ____________________________________________________________
- Follow up: You can either input
y
which stands for yes allowing you to still add the contact despite having a duplicate field orn
which stands for no to disregard adding the contact.
- Prerequisites: A contact with similar either similar name or details must already be in the contact list. For
simplicity, we will re-use the same command from
- Adding a contact with a wrong flag
- Test case:
add -n Ali -p alixpress
Expected: An error message will notify user that there appears to be a flag that is not recognised.____________________________________________________________ There appears to be a flag that is not recognised. Please try again with a valid flag. -n NAME -g GITHUB -l LINKEDIN -te TELEGRAM -tw TWITTER -e EMAIL ____________________________________________________________
- Test case:
- Adding a contact with a wrong command
- Test case:
Add -n Ben
Expected: An error message will notify user that ConTech is unable to understand the command and that the user can try to input a valid command. The issue with the test case is that theadd
command has a capital A.____________________________________________________________ ConTech is unable to understand your request. Please try again with a valid command. ____________________________________________________________
- Test case:
- Adding a contact with an invalid field format
- Test case:
add -n George -e george
Expected: An error message will notify user on the field with the invalid format. For this test case, the email has the wrong format.____________________________________________________________ The email id is not correctly formatted, Rules for email id : * Lowercase letters only * Numbers, underscore, hyphen and dot allowed * Only one @ character allowed * Email cannot start or end with a symbol ____________________________________________________________
- Test case:
Viewing a contact
- Viewing a contact that is in the contact list
- Prerequisites: List all contacts using the
ls
command to find the index of specific contact. - Test case:
view 1
Expected: All details of the contact with index1
will be displayed.____________________________________________________________ Name: Alex Lee Github: github.com/alexlee Email: alex.lee@email.com Telegram: t.me/alexlee LinkedIn: linkedin.com/in/alexlee Twitter: twitter.com/alexl33 ____________________________________________________________
- Prerequisites: List all contacts using the
- Viewing user’s own personal contact
- Test case:
view me
Expected: All personal details of the user will be displayed. - Test case:
me
Expected: All personal details of the user will be displayed.
- Test case:
- Viewing a contact with a missing or invalid index
- Prerequisites: List all contacts using the
ls
command to find the index of specific contact. - Test case:
view -1
Expected: An error message will notify user on what the valid indexes are.____________________________________________________________ The index you have input is out of range. Please input a index between 0 and 2. ____________________________________________________________
- Test case:
view
Expected: An error message will notify user that there is an index missing.____________________________________________________________ There seems to be missing or invalid index in your request. Please enter command in the following way: view <INDEX> Enter <INDEX> between 0 and 2 or "me" (personal contact) ____________________________________________________________
- Prerequisites: List all contacts using the
Editing a contact
- Editing a contact with all fields
- Prerequisites: List all contacts using the
ls
command to find the index of specific contact. - Test case:
edit 1 -n Ben tan -g bentan -e ben.tan@email.com -te bentn -tw bent4n -l bentan
Expected: Contact at index 1 will have all fields edited. Each field will be displayed after it has been edited. The index of contacts will be changed after editing as the list will be sorted after the edit.____________________________________________________________ ConTech has edited the specified contact: Name: Ben tan Github: github.com/bentan Email: ben.tan@email.com Telegram: t.me/bentn LinkedIn: linkedin.com/in/bentan Twitter: twitter.com/bent4n ____________________________________________________________
- Prerequisites: List all contacts using the
- Editing a contact with fewer fields
- Prerequisites: List all contacts using the
ls
command to find the index of specific contact. - Test case:
edit 2 -n Charles -g chacharles -e charles@email.com
Expected: Contact at index 2 will have only the name, GitHub and email edited while the other fields, if filled will remain the same. All details will then be displayed.
- Prerequisites: List all contacts using the
- Editing a contact with missing or invalid index
- Prerequisites: List all contacts using the
ls
command to find the index of specific contact. - Test case:
edit -n Brandon
Expected: An error message will appear to notify that there are missing parameters.____________________________________________________________ There seems to be missing parameters in your request. Please enter command in this format: edit <INDEX> {-n <NAME>} {-g <GITHUB>} {-e <EMAIL>} {-te <TELEGRAM>} {-l <LINKEDIN>} {-tw <TWITTER>} example : edit 0 -n George -g procoder -te george123 NOTE : At least one flag and description required Order of parameters do not matter except for INDEX "me" is used as the INDEX for personal contact. ____________________________________________________________
- Test case:
edit 4 -n Brandon
Expected: An error message will appear to notify that the index is out of range.____________________________________________________________ The index you have input is out of range. Please input a number between 0 and 3 to edit saved contacts. Otherwise, input index "me" if you wish to edit your Personal Contact details. ____________________________________________________________
- Prerequisites: List all contacts using the
- Editing a user’s personal contact
- Test case:
edit me -n Zack -g zackster -e zack@email.com
- Expected: User’s personal detail will be edited and the personal details will be displayed including fields that were not edited.
- Test case:
- Editing a contact with duplicates
- Prerequisites: A contact with similar either similar name or details must already be in the contact list. For
simplicity, we will re-use the same command from
1
. - Prerequisites: List all contacts using the
ls
command to find the index of specific contact. - Test case:
edit 0 -n Ben tan -g bentan -e ben.tan@email.com -te bentn -tw bent4n -l bentan
Expected: ConTech will display a list of contacts that are already in your contact list with the same fields as the ones you are editing. It will then ask for your confirmation whether you would still like to edit the contact or ignore it.____________________________________________________________ One of your saved contacts has a duplicate field: 1. Name: Ben tan Github: github.com/bentan Email: ben.tan@email.com Telegram: t.me/bentn LinkedIn: linkedin.com/in/bentan Twitter: twitter.com/bent4n Do you still want to edit the contact? (y/n) ____________________________________________________________
- Follow up: You can either input
y
which stands for yes allowing you to still edit the contact despite having a duplicate field orn
which stands for no to disregard editing the contact.
- Prerequisites: A contact with similar either similar name or details must already be in the contact list. For
simplicity, we will re-use the same command from
- Editing a contact with a wrong flag
- Test case:
edit 0 -p ali
Expected: An error message will appear to notify the user that there appears to be a flag that is not recognised.____________________________________________________________ There appears to be a flag that is not recognised. Please try again with a valid flag. -n NAME -g GITHUB -l LINKEDIN -te TELEGRAM -tw TWITTER -e EMAIL ____________________________________________________________
- Test case:
- Editing a contact with a wrong command
- Test case:
Edit -n Ben
Expected: An error message will appear to notify the user that ConTech is unable to understand the command and that the user can try to input a valid command. The issue with the test case is that theedit
command has a capital E.____________________________________________________________ ConTech is unable to understand your request. Please try again with a valid command. ____________________________________________________________
- Test case:
Deleting a contact
- Deleting a contact that is in the contact list
- Prerequisites: List all contacts using the
ls
command to find the index of specific contact. - Test case:
rm 1
Expected: User will be asked to confirm deleting the contact at the specified index. All details of the contact at index1
will be displayed to allow user to check before confirming.____________________________________________________________ Delete this contact? (y/n) 1. Name: Alex Lee Github: github.com/alexlee Email: alex.lee@email.com Telegram: t.me/alexlee LinkedIn: linkedin.com/in/alexlee Twitter: twitter.com/alexl33 ____________________________________________________________
- Follow up: You can either input
y
which stands for yes allowing you to delete the contact orn
which stands for no to cancel deleting the contact.
- Prerequisites: List all contacts using the
- Deleting a contact with a missing or invalid index
- Prerequisites: List all contacts using the
ls
command to find the index of specific contact. - Test case:
rm -1
Expected: An error message will notify user on what the valid indexes are.____________________________________________________________ The index you have input is out of range. Please input a index between 0 and 2. ____________________________________________________________
- Test case:
rm
Expected: An error message will notify user that there is an index missing.____________________________________________________________ There seems to be missing or invalid index in your request. Please enter command in the following way: rm <INDEX> {REMOVE_DETAIL_FLAGS} Enter <INDEX> between 0 and 3 ____________________________________________________________
- Prerequisites: List all contacts using the
- Deleting all contacts in the contact list
- Test case:
rm all
Expected: User will be asked to confirm deleting all the contacts in the contact list.____________________________________________________________ Delete all of your contacts? (y/n) ____________________________________________________________
- Follow up: You can either input
y
which stands for yes allowing you to delete all contacts orn
which stands for no to cancel deleting all contacts.
- Test case:
- Deleting one or few fields from a contact
- Prerequisites: List all contacts using the
ls
command to find the index of specific contact. - Test case:
rm 1 -g
Expected: User will be asked to confirm deleting a field from the contact at the specified index. The specified field of the contact at index1
will be displayed to allow user to check before confirming. For this test case, only the GitHub for the contact at index1
will be displayed as only the-g
flag is mentioned.____________________________________________________________ Delete the following fields for Ben tan? (y/n) Github: github.com/bentan ____________________________________________________________
- Follow up: You can either input
y
which stands for yes allowing you to delete the field from the contact orn
which stands for no to cancel deleting the field from the contact.
- Prerequisites: List all contacts using the
Searching for a contact
- Search for a contact that is in the contact list
- Test case:
search alex
Expected: All contacts withalex
in their name will be listed____________________________________________________________ 1. Name: Alex Lee Github: github.com/alexlee Email: alex.lee@email.com Telegram: t.me/alexlee ____________________________________________________________
- Test case:
- Search for a contact with a specified field
- Test case:
search -g alexlee
Expected: All contacts with the GitHub username containingalexlee
will be listed.____________________________________________________________ 1. Name: Alex Lee Github: github.com/alexlee Email: alex.lee@email.com Telegram: t.me/alexlee ____________________________________________________________
- Test case:
- Search for a contact that is not in the contact list
- Test case:
search mebe
Expected: Error message will notify users that no contacts are found.____________________________________________________________ No search results found. ____________________________________________________________
- Test case:
- Search with no parameters specified
- Test case:
search
Expected: Error message will notify user that the command is invalid.____________________________________________________________ There seems to be missing parameters in your request. Please enter command in this format: search {FLAG} <QUERY> example : search Ashraf search -g revflash NOTE : Flag is optional and only one can be specified ____________________________________________________________
- Test case:
Importing contacts
- Importing contacts with all valid details
- Test case:
import
Expected: All contacts will be imported successfully.____________________________________________________________ ConTech has successfully imported 3 lines ____________________________________________________________
- Test case:
- Importing a contact with invalid fields
-
Test case:
import
Expected: Error message will notify the user that there is an invalid field.data/import.txt:1 - There is an invalid field. ____________________________________________________________ The github username is not correctly formatted, Rules for Github username : * Only contain alphanumeric characters or hyphens * Only lowercase allowed * Maximum 39 characters allowed * Cannot have multiple consecutive hyphens * Cannot begin or end with a hyphen ____________________________________________________________ ____________________________________________________________ ConTech has successfully imported 0 lines ____________________________________________________________
-
- Importing a contact with missing fields
- Test case:
import
Expected: Error message will notify the user that there are missing fields.data/import.txt:1 - "ashraf,ashrafjfr,null,null" is corrupted and not loaded. ____________________________________________________________ ConTech has successfully imported 0 lines ____________________________________________________________
- Test case: