0% found this document useful (0 votes)
410 views101 pages

Fyp Phase 1 & 2 Documentation

This document describes a final year project titled "NEWSER" submitted to the Department of Computer Science & IT at The University of Lahore. The project involves building a web-based news aggregation application that allows users to search, view, and analyze news articles from various sources in one place. Key features include searching by date, newspaper, author, performing keyword searches, detecting fake news, and visualizing trending topics. The project uses technologies like Python, Flask, MongoDB, NLTK, and JavaScript for implementation.

Uploaded by

Mobashirah Nasir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
410 views101 pages

Fyp Phase 1 & 2 Documentation

This document describes a final year project titled "NEWSER" submitted to the Department of Computer Science & IT at The University of Lahore. The project involves building a web-based news aggregation application that allows users to search, view, and analyze news articles from various sources in one place. Key features include searching by date, newspaper, author, performing keyword searches, detecting fake news, and visualizing trending topics. The project uses technologies like Python, Flask, MongoDB, NLTK, and JavaScript for implementation.

Uploaded by

Mobashirah Nasir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 101

NEWSER

Project ID:

Session: BSCS Fall 2016 to 2020

Project Advisor: Mobashirah Nasir

Submitted By

Muhammad Hamza Asif 70068815


Muhammad Asim 70044503

Department of Computer Science & IT


The University of Lahore
Lahore, Pakistan
Declaration

We have read the project guidelines and we understand the meaning of academic dishonesty, in
particular plagiarism and collusion. We hereby declare that the work we submitted for our final
year project, entitled NEWSER is original work and has not been printed, published or
submitted before as final year project, research work, publication or any other documentation.

Group Member 1 Name: Muhammad Hamza Asif


SAP No: 70068815

Signature: …………………………

Group Member 2 Name: Muhammad Asim


SAP No: 70044503

Signature: …………………………

i
Statement of Submission

This is to certify that Muhammad Hamza Asif Roll No. 70068815 and Muhammad Asim
Roll No. 70044503 have successfully submitted the final project named as: Newser at Computer
Science & IT Department, The University of Lahore, Lahore Pakistan, to fulfill the partial
requirement of the degree of BS in Computer Science.

Supervisor Name: Ma’am Mobashirah Nasir


Signature: …………………………
Date: ………………………

ii
Dedication

This project is dedicated to my father, who taught me that the best kind of knowledge to have is
that which is learned for its own sake. It is also dedicated to my mother, who taught me that even
the largest task can be accomplished if it is done one step at a time.

iii
Acknowledgement

We truly acknowledge the cooperation and help by Ma’am Mobashirah Nasir, Lecturer at
the University of Lahore. She has been a constant source of guidance throughout the course of
this project. We are also thankful to our friends and families whose silent support led us to
complete our project.

Date:
Dec 25, 2020

iv
Abstract

The product defines a web-based application known as “NEWSER”. The purpose of the
system is to show news loving people, the news articles from across different local and
international newspapers on one platform to save their time. Not only showing news articles,
there are certain more functionality added to them like an AI based Fake News Detection.
In this product, the focus is on displaying news articles along with the links to their original
source, where readers can search news by date, newspaper name, articles ,author name and
advanced keyword based search of any incident, city etc. The related news articles from other
newspapers would be shown once user clicks on one article. The system will also process past
Week’s articles to show most frequent words appeared in news articles which could be of
certain importance i-e to estimate which news has been in circulation the past few days.
The system stored all records in database related to news articles. This system is implemented
in python language with Flask framework.

v
Area of the Project
Artificial Intelligence And Web Development

Technologies used
The tools that are used for the implementation of this system are Visual Studio Code
editor, Argo UML, MongoDB compass and Diagram Designer for UML diagrams such
as use case diagrams, class diagrams, and domain model. Microsoft Word is used for
documentation write-up. For designing a plan of the system, project library is used. This
system is implemented in Python with Flask framework. MongoDB is used as data
base. NLTK library is used for frequent keywords extraction. . Passive Aggressive Classifier
moel is used for Fake News Detection. Python Beautiful Soup module is used for news scraping.
Python Newspaper3k module is used for extracting different features from news. PyMongo is
used for storing/extracting data from DB. Python Pickle library is used for loading our trained
model. JavaScript Highcharts library is used for data visulization. Python Pandas module is used
for preparing datasets. Tdidf Vectorizer is used for extracting features from news.

vi
List of Figures

Figure 1 Usecase Diagram............................................................................................................15


Figure 2 Usecase Diagram Login.................................................................................................16
Figure 3 Usecase Diagram Search by Newspaper........................................................................17
Figure 4 Usecase Diagram Search by Date..................................................................................18
Figure 5 Usecase Diagram Search by Author’s Name.................................................................19
Figure 6 Usecase Diagram View Single Article...........................................................................20
Figure 7 Usecase Diagram Advance Keyword Search.................................................................21
Figure 8 Usecase Diagram Get Popular Keyword........................................................................22
Figure 9 Usecase Diagram Popular News....................................................................................23
Figure 10 Usecase Diagram Update News....................................................................................24
Figure 11 Usecase Diagram Delete News.....................................................................................25
Figure 12 Usecase Diagram Publish News....................................................................................26
Figure 13 Usecase Diagram Fake News........................................................................................27
Figure 14 Architecture Diageam....................................................................................................28
Figure 15 Level 0 DFD..................................................................................................................29
Figure 16 Level 1 DFD..................................................................................................................29
Figure 17 Class Diagram...............................................................................................................30
Figure 18 Activity Diagram Search...............................................................................................31
Figure 19 Activity Diagram Update Article..................................................................................32
Figure 20 Activity Diagram Add News.........................................................................................33
Figure 21 Activity Diagram Login................................................................................................34
Figure 22 Sequence Diagram Search Article.................................................................................35
Figure 23 Sequence Diagram Browse by Date..............................................................................36
Figure 24 Sequence Diagram Browse By Newspaper...................................................................36
Figure 25 Sequence Diagram Browse by Author’ Name..............................................................37
Figure 26 Sequence Diagram Advance Keyword Search..............................................................37
Figure 27 Sequence Diagram View Popular Article.....................................................................38
Figure 28 Sequence Diagram Popular Keyword...........................................................................38
Figure 29 Sequence Diagram View Single Article........................................................................39
Figure 30 Collaboration Diagram Keyword..................................................................................40

vii
Figure 31 Collaboration Diagram by Author Name......................................................................40
Figure 32 Collaboration Diagram by Date....................................................................................41
Figure 33 Collaboration Diagram by Newspaper..........................................................................41
Figure 34 Collaboration Diagram Update Article.........................................................................42
Figure 35 Collaboration Diagram Add News................................................................................42
Figure 36 State Transition Diagram...............................................................................................43
Figure 37 Component Diagram.....................................................................................................44
Figure 38 Deployment Diagram....................................................................................................45

List of Tables

Table 0 Functional Requirement Login.........................................................................................10


Table 1 Functional Requirement Signup.......................................................................................10
Table 2 Functional Requirement Forget Password........................................................................11
Table 3 Functional Requirement Add News..................................................................................11
Table 4 Functional Requirement Search........................................................................................12
Table 5 Functional Requirement Article.......................................................................................12
Table 6 Usecase Login...................................................................................................................16
Table 7 Usecase Search by News Paper........................................................................................17
Table 8 Usecase Search by Date....................................................................................................18
Table 9 Usecase Search by Author Name.....................................................................................19
Table 10 Usecase View Single Article..........................................................................................20
Table 11 Usecase Advance Keyword Search................................................................................21
Table 12 Usecase Get Popular Keyword.......................................................................................22
Table 13 Usecase Popular News....................................................................................................23
Table 14 Usecase Update News.....................................................................................................24
Table 15 Usecase Delete News......................................................................................................25
Table 16 Usecase Publish News....................................................................................................26
Table 17 Usecase Fake News........................................................................................................27

viii
Table of Content

Declaration.........................................................................................Error: Reference source not found


Statement of Submission....................................................................Error: Reference source not found
Dedication...........................................................................................Error: Reference source not found
Acknowledgement..............................................................................Error: Reference source not found
Abstract..............................................................................................Error: Reference source not found
List of Figures......................................................................................Error: Reference source not found
List of
Tables............................................................................................................................Error:
Reference source not found

Chapter 1: Introduction to the Problem...........................................................................................................................1


1.1 Introduction...............................................................................................................................................................1
1.2 Purpose......................................................................................................................................................................1
1.3 Objective...................................................................................................................................................................1
1.4 Existing Solution.......................................................................................................................................................1
1.5 Proposed Solution.....................................................................................................................................................2
Chapter 2: Software Requirement Specification.............................................................................................................3
2.1 Introduction...............................................................................................................................................................3
2.3 Specific requirements................................................................................................................................................8
• Usability.......................................................................................................................................................................9
• Reliability.....................................................................................................................................................................9
• Performance..................................................................................................................................................................9
• Portability.....................................................................................................................................................................9
• Maintainability.............................................................................................................................................................9
• License Agreement.......................................................................................................................................................9
Chapter 3: Use Case Analysis.......................................................................................................................................10
Chapter 3: Use Case Analysis.......................................................................................................................................10
Chapter 4: Design.........................................................................................................................................................24
4.1 Architecture Diagram :..........................................................................................................................................24
4.2 ERD with data dictionary........................................................................................................................................25
4.3 Data Flow diagram..................................................................................................................................................25

ix
4.4 Class Diagram.........................................................................................................................................................26
4.5 Activity Diagram....................................................................................................................................................27
4.6 Sequence Diagram..................................................................................................................................................31
4.7 Collaboration Diagram............................................................................................................................................36
4.8 State Transition Diagram........................................................................................................................................39
4.9 Component Diagram...............................................................................................................................................40
4.10 Deployment Diagram............................................................................................................................................41
Chapter 5: Testing.........................................................................................................................................................42
5.1 Test Case Specifications.........................................................................................................................................42
Test Case For Search By Newspaper:...........................................................................................................................42
Search By Author’s name:............................................................................................................................................44
Search By Date:............................................................................................................................................................45
View Single Article:.....................................................................................................................................................47
Advanced Keywords Search:........................................................................................................................................49
Get Popular Keywords:.................................................................................................................................................50
Popular News:...............................................................................................................................................................52
Update news:.................................................................................................................................................................53
Delete news:..................................................................................................................................................................55
Publish News:...............................................................................................................................................................57
Fake News:....................................................................................................................................................................58
5.2 Black Box Test Cases.............................................................................................................................................60
5.3 White Box Test Cases.............................................................................................................................................69
Login.............................................................................................................................................................................70
Search by newspaper.....................................................................................................................................................71
Search by date...............................................................................................................................................................72
Search by author name..................................................................................................................................................73
Update news..................................................................................................................................................................74
Delete news...................................................................................................................................................................75
Publish news.................................................................................................................................................................76
Fake news......................................................................................................................................................................77
Get popular news..........................................................................................................................................................78
5.4 Performance testing................................................................................................................................................78
5.5 Stress Testing..........................................................................................................................................................79
5.6 System Testing........................................................................................................................................................79
5.7 Regression Testing..................................................................................................................................................80
Chapter 6: Tools and Techniques.................................................................................................................................81
Tools:............................................................................................................................................................................81
1. Visual Studio Code...................................................................................................................................................81
2. Argo UML................................................................................................................................................................81
Chapter 7: Summary and Conclusion...........................................................................................................................82
Summary:......................................................................................................................................................................82
Conclusion:...................................................................................................................................................................82
Chapter 8: User Manual................................................................................................................................................83
1. Main Screen..............................................................................................................................................................83
2. News Screen..............................................................................................................................................................83
3. Search by Newspaper................................................................................................................................................84
4. Search by Area..........................................................................................................................................................85
Chapter 9: Lessons Learnt and Future Work................................................................................................................85
Lessons Learnt:.............................................................................................................................................................85
Future Work :................................................................................................................................................................85
References.....................................................................................................................................................................86
Appendix.......................................................................................................................................................................87
o Examples:.................................................................................................................................................................87

x
xi
Chapter 1: Introduction to the Problem

1.1Introduction
This chapter first introduces the NEWSER(NEWS-scrapER). It highlights the problem that
has been addressed in this work along with the designed and developed solution. It also
elaborates project organization and project planning. Finally, this chapter explains the scope
and objectives of this project.

1.2Purpose
No one would disagree with the fact that how much people have gone busier these
days, no matter where but such is the life. They don’t have enough time to get themselves
notified of what’s going around in the world or more specifically their city/region. But they
wish to have some mean where they can find all the news from different newspapers at one
place or read news related to their city/province, certain date, certain author or type a
keyword to search an incident/event, which could considerably save their precious time.
Besides that, people are also interested in finding which topics were more frequent in news in
recent past so they can get to know the popular news from the past week or so. Thus, they
would like to see this feature be available in news sites. Moreover now a days the major problem
is that people do not know either the news is fake or real.

1.3Objective
The primary objective of the NEWSER is to provide news headlines from across
different news sites in order to save newsreaders time so they would not have to read
every newspaper to find the news related to particular event/city/newspaper/date/author etc.
and get to know the important news in recent past. Moreover if users want to know either any
news is fake or real then there is a Fake News Detection in NEWSER.

1.4Existing Solution
Almost all the related websites are developed in WordPress which are not secure enough. Code
for NEWSER is written in python using FLASK framework which is secure. Moreover NEWSER
provides fake news detection which will allow our users to check either the news/article they are
reading is fake or real.

1
1.5Proposed Solution
NEWSER is a web-based application which will show readers news articles scraped
from different national and international news websites. Users can search news by selecting
date and all news articles of that day would be displayed. Similarly, users can read news of a
particular newspaper by selecting its name from the list. If user clicks on a particular article,
all articles related to that news would also be shown plus the link to original source. If user
wants to read the articles of a specific author, he/she can do so by typing author name. An
advanced keyword based search is implemented so that users can find specific news by
typing its main keywords. If the user is reading news from any other news website or article,
there is an Artificial Intelligence based Fake News Detection in our application which will tell
our users how much fake or real that news is. This system is implemented in Python language
with Flask framework. Mongodb database is used to store news articles and their related things.
This saved information will be used in further processing.

2
Chapter 2: Software Requirement Specification

2.1 Introduction

2.1.1 Purpose
The purpose of SRS is to present a detail description of the NEWSER Application. The
document contains the explanation of what the website will do, what the features it
provides, under which constraints it will work or operate and how the application will
react to different stimuli. The document is intended for both the customer and developer
of the application.

2.1.2 Scope
The functional requirement of the project is to scrap and display news headlines, content and
links to the original source. Readers can browse news by date, author‟s name, newspaper and
keyword based search to particular incidents. Readers will get related news to the one they are
reading right now. They can also view most frequent words appeared in news headlines in the
past week which can be used for further analysis i-e news articles containing those words
could be of more importance. The non-functional requirements include using legitimate and
renowned news sites to crawl data, making interface user friendly and interactive and finally,
NEWSER should provide news to its readers keeping time efficiency in consideration.

2.1.3 Definitions, acronyms, and abbreviations

Terms Description
NEWSER NEWS scrapER
UML Unified Modeling Language
User News Readers
System Web-based application(NEWSER)
SRS Software Requirement Specification
App Application
API Application Programming Interface
UI User Experience
UX User Experience

3
2.1.4 Product perspective:
• System interfaces

• User interfaces
User Interface is the part of the software and is designed in such a way that it is
expected to provide the user insight of the system. The following interfaces are given,
Home page, Search by Date, Search by Author?s name, Search by Newspaper name,
SingleArticle,
Advanced Keyword Search, Popular Keywords search.

4
• Hardware interfaces
The hardware dependencies include a computer, laptop, router and an internet
modem. A web server will also be needed.
• Software interfaces
There is no software dependencies required in this application.
• Communications interfaces
The system shall use the HTTP protocol for communication. Since the system
will run over the internet, all the hardware shall be required to be connected to
internet. Communication network can be a LAN, WAN or MAN.
• Memory
Primary memory should be of minimum 2 GB RAM, and minimum 100 GB of
hard drive.
• Operations
The major functions of the NEWSER are:

1. Scraping whole news articles along with the images from different sources and
display those with clickable links back to those sources.
2. Displaying news based on newspaper name.
3. Displaying news of particular dates.
4. Filtering news by author‟s name.
5. Showing related news of the current opened news article.
6. Displaying most frequent keywords appeared in news headlines in the past week
or so.
7. Displaying news based on keywords entered.
Displaying most viewed articles
• Site adaptation requirements.

5
There is no site mode implemented in this application

2.2.2 Product functions

ID: FR_00
Name: Login
Description Input Output Requirements Basic work flow

Login to access Click the “Login” Logged In Verification of Click the “Login”
your account button Successfully credentials from button and wait
database for the
response

Table 0 Functional Requirement Login

ID: FR_01
Name: Signup
Description Input Output Requirements Basic work flow

Signup to add Click the Shows Signup Credentials of Click the


news “Signup” button window user “Signup” button
and wait for the
response

Table 1 Functional Requirement Signup

ID: FR_02
Name: Forget Password
Description Input Output Requirements Basic work flow

6
Make a new Click the Password changed Enter your Click the button
password in case “Forget Email address. and enter email
you forgot your Password” button address and wait for
old password verification mail.

Table 2 Functional Requirement Forget Password

ID: FR_03
Name: ADD News
Description Input Output Requirements Basic work flow

Lets the admin to Click “Add News” Report/News is The user will need to have After clicking the
add news. button to write any shared with a profile to send the news button the user will
news. everyone. to servers which will need to write the
deliver the news news and select the
according to requested audience to which
audience. he wants to share the
news.

Table 3 Functional Requirement Add News

ID: FR_04
Name: Search
Description Input Output Requirements Basic work flow

7
Search anything Click the Anything that The search Click the search bar
that is on public ‘Search’ bar and you searched will query must be and type in anything
news droid. type your query. be shown in shown that you want to
results. somewhere in search and the results
the app so that it will be shown.
could be shown.

Table 4 Functional Requirement Search

ID: FR_05
Name: Article
Description Input Output Requirements Basic work flow

A list of hot news Click any of the News from The user should After clicking a
topics will be listed topic from specific topic be logged in to specific topic all the
to read specifically ‘Articles’ section will be shown. view topics. news from that topic
about something. to view that only will be shown
Topics. arranged in an
ascending way.
Table 5 Functional Requirement Article

2.2.3 User characteristics


It is expected that the users/readers have computers or mobiles with an internet connection
and they also know how to use them to access websites.

8
2.2.4 Constraints
Users must have working internet connection and some means i-e computer/mobile to access the
internet.

2.2.5 Assumptions and dependencies


It is assumed that the users/readers have computers or mobiles with an internet connection
and they also know how to use them to access websites.

2.2.6 Apportioning of requirements


One or two of the functional requirements may be delayed but we cannot specify them at
this time of the project.

2.3 Specific requirements

2.3.2 Functional Requirement


The basic functional requirements are given below.
 Scrap general news articles from different news websites and display them with
clickable links back to those sources.
 Give most frequent keywords of the past week.
 Display news articles of a specific date.
 Display most viewed articles in the application.
 Display news articles from a specific newspaper.
 Display news based on author‟s name selected.
 Provide keyword based searching of news articles.

2.3.3 Non-functional Requirements


• Usability
The system will be easy to use, with a friendly and beautiful user interface
so that the system appeals to the users and they are able to get used to it as soon as
possible. The users would be able to use the system without any training and it
shall be self-explanatory and intuitive
• Reliability
The system should be reliable that is it should have almost no zero
occurrence of failure. It should be able to work properly all the time. The system
should give proper response of every user action.

• Performance

9
The system must have strong computing capabilities for data processing in
order to perform keyword based searching and making word cloud of popular
keywords. System should be able to deal with numerous users at a time.
• Portability
It is a web-based application and can run on any digital computer
provided it has an active internet connection and some application software like
browsers installed
• Maintainability
Usually, maintainability involves continuous improvement in the system or
improve the reliability of the system based on maintenance experience. The
application should be easy to extend. The code should be written in a way that is
favors implementation of new functions.
• License Agreement
User can use this application anywhere without any fees and any kind of
restriction. But as the application is closed source application and proprietary
license applicable, so user have no rights to check, use or modify the source code
of the application

10
Chapter 3: Use Case Analysis
Chapter 3: Use Case Analysis
User can view General news headlines, Search by Newspaper, Filter by Date, Search
articles by Author’s name, view most viewed articles, view Single Article which is then
more elaborated with links to original source and related articles. Popular keywords of the
past week are also shown so does Popular News. User can search any incident by typing
its keywords in the Advanced Keyword Search option.

11
Figure 1 Use Case Diagram

Use Case 1: Login

Login

User

Figure 2 Use Case Diagram for Login

Use Case Diagram Detail


Use Case ID UC_01

Use Case Title Login


Description This use case shows that the user can access his/her account.
Primary Actor User

Secondary Actor System


Pre-Conditions User must have a registered account.
Post-Conditions Successfully logged in

Basic Flow Actor Action System Action

 Enter correct email  The user can access his/her


 Enter correct password account after logging in.

12
Click the “Login” button
from the interface.
Alternate Flow
Table 6 Use case Login

Use Case 2: Search by Newspaper

Figure 3 Use Case Diagram for Search by Newspaper

Use Case Diagram Detail


Use Case ID UC_02
Use Case Name Search by Newspaper
Description Detail of this usecase
Primary Actor User
Secondary Actor
Pre-Condition User has opened the application.
Table 7 Use case Search by Newspaper

13
Use Case 3: Search by Date

Figure 4 Use Case Diagram for Search by Date

Use Case Diagram Detail


Use Case ID UC_03
Use Case Name Search By Date
Description Detail of this usecase
Primary Actor User
Secondary Actor
Pre-Condition User has opened the application.
Post-Condition News articles of the date selected are displayed.
Basic Flow Actor Action System Action

14
Flow of information What would system do according to
the information

Alternate Flow 1a. News related to date entered is not available. 1. System displays an
empty result. 2a. User clicks on Submit Query without selecting date. 2.
System does not submit anything
Table 8 Use case Search by Date

Use Case 4: Search by Author’s name

Figure 5 Use Case Diagram for Search by Author’s Name

Use Case Diagram Detail

Use Case ID UC_04


Use Case Name Search By Author’s name
Description Detail of this usecase
Primary Actor User
Secondary Actor
Pre-Condition User has opened the application.
Post-Condition All news articles of the author selected are shown
Basic Flow Actor Action System Action

15
Flow of information What would system do according to
the information

Alternate Flow 1a. News articles of that author are not available. 1. System displays an
empty result. 2a. User presses Enter key without selecting author‟s name.
2. System does not submit anything.
Table 9 Use case Search by Author name

Use Case 5: View Single Article

Figure 6 Use Case Diagram for View Single Article

Use Case Diagram Detail

Use Case ID UC_05


Use Case Name View Single Article
Description Detail of this usecase
Primary Actor User
Secondary Actor

16
Pre-Condition News articles are displayed on the screen
Post-Condition
Basic Flow Actor Action System Action
Flow of information What would system do according to
the information

Alternate Flow 1a) Server down or internet connection not working. 5. User waits until
server response and internet connection is recovered. 2a) At any time
system crashes. 6. User restarts system.
Table 10 Use case View Single Article

Use Case 6: Advanced Keyword Searching

Figure 1 Use Case Diagram for Advance Keywords Search

Use Case Diagram Detail

Use Case ID UC_06


Use Case Name Advanced Keywords Search
Description Detail of this usecase
Primary Actor User

17
Secondary Actor
Pre-Condition User has opened the application.
Post-Condition News articles related to the keywords are displayed
Basic Flow Actor Action System Action
Flow of information What would system do
according to the information

Alternate Flow 1a) News articles related to typed keyword are not available 1.
System displays no articles. 2a) At any time system crashes. 2.
Admin restarts system.
Table 11 Use case Advance Keywords Search

Use Case 7: Get Popular Keywords

Figure 8 Use Case Diagram for Get Popular Keywords

Use Case Diagram Detail

Use Case ID UC_07


Use Case Name Get Popular Keywords
Description Detail of this usecase
Primary Actor User
Secondary Actor

18
Pre-Condition User has opened the application.
Post-Condition Most frequent keywords appeared in news title from past week are
displayed.
Basic Flow Actor Action System Action
Flow of information What would system do according to
the information

Alternate Flow 1a) Server down or internet connection not working. 1. User waits until
server response and internet connection is recovered. 2a) At any time
system crashes. 2. User restarts system.
Table 12 Use case Get Popular Keywords

Use Case 8: Popular News

Figure 9 Use Case Diagram for Popular News

Use Case Diagram Detail

Use Case ID UC_08


Use Case Name Popular News
Description Detail of this usecase

19
Primary Actor User
Secondary Actor
Pre-Condition User has opened the application.
Post-Condition Most viewed articles in the system are diplayed
Basic Flow Actor Action System Action
Flow of information What would system do
according to the information

Alternate Flow 1a) Server down or internet connection not working. 3. User waits until
server response and internet connection is recovered. 2a) At any time
system crashes. 4. User restarts system.
Table 13 Use case Popular News

Use Case 9: Update News

Figure 10 Use Case Diagram for Update News

Use Case Diagram Detail


ID UC_09
Name Update news
Primary Actor Admin
Pre-Conditions Click on the specific news

20
Post-Conditions Successfully updated the news
1. User opens the NEWSER application.
Main Success 2. System displays news articles.
Scenario 3. Admin select the required article which has to be updated.
4. Admin clicks on the edit button and update accordingly
5. Admin clicks on the save button and update the required news
article.
Alternative 1) Server down or internet connection not working.
Flows or 5. User waits until server response and internet connection is
Extensions recovered.
2a) At any time system crashes.
Frequency Could be nearly continuous.
Table 14 Use case Update News

Use Case 10: Delete News

Figure 11 Use Case Diagram for Delete News

Use Case Diagram Detail

ID UC_10

21
Name Delete news
Primary Actor Admin
Pre-Conditions Selected the required news or article which has to be deleted.
Post-Conditions News article is successfully deleted.
1.Admin opens the NEWSER application and logged in to the system.
Main Success 2.Admin will select the required article or the news
3.Admin will select the delete button to delete it.
Scenario
4.Admin clicks on the save button when done.
1) Server down or internet connection not working.
Alternative 2) At any time system crashes.
Flows or
4. User waits until server response and internet connection is
Extensions recovered.
Frequency Could be nearly continuous.
Table 15 Use case Delete News

Use Case 11: Publish News

Figure 12 Use Case Diagram for Publish News

Use Case Diagram Detail

22
ID UC_11
Name Publish News
Primary Actor Admin
Pre-Conditions Admin should logged in to the application
Post-Conditions New news have been successfully added.
1. Admin opens the NEWSER application and logged in to the system.
Main Success 2. Admin clicks on the “Add new” article button.
Scenario 3. Admin add the new article and click on the
save button and upload it to the application.
Alternative Flows 1) Server down or internet connection not working.
or Extensions 2) At any time system crashes.

Frequency Could be nearly continuous.


Table 16 Use case Public News

Use Case 12: Fake News

Figure 13 Use Case Diagram for Fake News

23
Use Case Diagram Detail

ID UC_12
Name Fake News
Primary Actor Admin
Pre-Conditions Select the required news or article which has to be tested
Post-Conditions News article is successfully tested.
Main Success 1.Admin opens the NEWSER application and logged in to the
Scenario system.
2.Admin will select the required article or the news
3.Admin will select the authenticated button to test it.
4.Admin clicks on the upload button when done.
Alternative Flows 1) Server down or internet connection not working.
or Extensions 2) At any time system crashes.
3) User waits until server response and internet connection is
recovered.
Frequency Could be nearly continuous.
Table 17 Use case Fake News

Chapter 4: Design

4.1 Architecture Diagram :

24
Figure 24 Architecture Diageam

4.2 ERD with data dictionary


Since I've used MongoDB database which is NoSQL and non-relational database. All
the articles are stored as documents in a single collection. Thus there is no ERD.

25
4.3 Data Flow diagram
Data flow diagram includes two levels

4.3.1 The level 0


The flow of information inside the system is defined in this level

Figure 15 Level 0 DFD

4.3.2 The level 1


The flow of information outside the system is defined in this level

Figure 16 Level 1 DFD

4.4 Class Diagram


Describe the structure of a project by showing the systems classes, their attributes, operations (or
methods), and the relationships among objects.

26
Figure 17 Class Diagram

27
4.5 Activity Diagram

Figure 18 Activity Diagram Search

28
Figure 19 Activity Diagram Update Article

29
Figure 20 Activity Diagram Add New News

30
Figure 21 Activity Diagram Login

31
4.6 Sequence Diagram
This diagram includes all the Sequence diagrams of the functional requirements of your project
along with the aggregated Sequence diagram
The Sequence diagrams can be made by using Visual Paradigm
1. Select Diagram > New from the application toolbar.
2. In the New Diagram window, select Sequence Diagram.
3. Click Next.
4. Enter the diagram name and description.
5. Click OK.

For example, yours create account Sequence look like this and you have to follow this template
for writing your Sequence diagrams
Sequence diagram for create account

Sequence diagram of search article

Figure 22 Sequence Diagram for Search Article

32
SSD for Browse by Date

Figure 23 Sequence Diagram for Browse by Date

SSD for Browse by Newspaper

Figure 24 Sequence Diagram for Browse by Newspaper

33
SSD for Browse by Author’s name

Figure 25 Sequence Diagram for Browse by Author’s name

SSD for Advanced Keywords Searching

Figure 26 Sequence Diagram for Advanced Keywords Searching

34
SSD for Viewing Popular Articles

Figure 27 Sequence Diagram for Viewing Popular Articles

SSD for Popular Keywords

Figure 28 Sequence Diagram for Popular Keywords

35
SSD for Viewing Single Article

Figure 29 Sequence Diagram for Viewing Single Article

36
4.7 Collaboration Diagram
4.7.1 Collaboration Diagram Keyword

Figure 30 Collaboration Diagram Keyword

4.7.2 Collaboration Diagram by Author Name

Figure 31 Collaboration Diagram by Author Name

37
4.7.3 Collaboration Diagram Date

Figure 32 Collaboration Diagram Name

4.7.4 Collaboration Diagram by Newspaper

Figure 33 Collaboration Diagram Newspaper

38
4.7.5 Collaboration Diagram Update Article

Figure 34 Collaboration Diagram Update Article

4.7.6 Collaboration Diagram Add News

Figure 35 Collaboration Diagram Add News

39
4.8 State Transition Diagram

Figure 36 State Transition Diagram

40
4.9 Component Diagram

Figure 37 Component Diagram

41
4.10 Deployment Diagram

Figure 38 Deployment Diagram

42
Chapter 5: Testing

5.1 Test Case Specifications


This Testing phase includes all the Test Cases of the functional requirements of your project
For example, your login account test case looks like this and you have to follow this template for
writing your project test cases

Test Case For Search By Newspaper:


Positive Test Case

ID Search by newspaper
Priority High
Description Search by newspaper
Reference FR_2
Users User
Pre-requisites A.System is online
B.System has internent

Steps A Open the website

B Click on sign in button.


C Enter Required information
D Click on search by newspaper button.

Input Incident
accident

Expected result Result is


shown

Status Tested, passed.

43
Negative Test Case

ID Search by newspaper
Priority HIGH
Description Search by newspaper
Reference FR_2
Users User
Pre-requisites A.System is online
B.System has internent

Steps Open the website

Click on sign in button.


Enter Required information
Click on search by newspaper button.

Input “nestle”

Expected result Invalid entry

Status Tested, passed.

44
Search By Author’s name:

Positive Test Case

ID Search By Author’s name


Priority High
Description Search By Author’s name
Reference FR_03
Users User/Customer.
Pre-requisites A System is online.
B User has internet access.

Steps Open the website

Click on sign in button.


Enter Required information
Click on search by author button.

Input

Expected result Result is


shown

Status Tested, passed.

Negative Test Case

ID Search By Author’s name

45
Priority High
Description Search By Author’s name
Reference FR_03
Users User/Customer.
Pre-requisites System is online.
User has internet access.

Steps Open the website.

Click on sign in button.


Enter Required information
Click on search by author button.

Input
Ali haider 7

Expected result Author name


incorrect

Status Tested, passed.

Search By Date:

Positive Test Case

ID Search By Date
Priority High
Description Search By Date
Reference FR_04
Users User/Customer.

46
Pre-requisites System is online.
User has internet access.

Steps Open the website

Click on sign in button.


Enter Required information
Click on search by date button.

Input
Name
Date
Id

Expected result Result is


shown

Status Tested, passed.


Negative Test Case

ID Search By Date
Priority High
Description Search By Date
Reference FR_04
Users User/Customer.
Pre-requisites System is online.
User has internet access.

Steps Open the website.

Click on sign in button.


Enter Required information
Click on search by date button.

47
Input
11@2020

Expected result Invalid date

Status Tested, passed.

View Single Article:

Positive Test Case

ID View Single Article


Priority High
Description View Single Article
Reference FR_05
Users User/Customer.
Pre-requisites System is online.
User has internet access.

Steps Open the website.

Click on sign in button.


Enter Required information
Click on view single button.

Input
No input

48
Expected result Result is
shown

Status Tested, passed.


Negative Test Case

ID View Single Article


Priority High
Description View Single Article
Reference FR_05
Users User/Customer.
Pre-requisites System is online.
User has internet access.

Steps Open the website.

Click on sign in button.


Enter Required information
Click on view single button.

Input
No input

Expected result No entery


made

Status Tested, passed.

49
Advanced Keywords Search:

Positive Test Case

ID Advanced Keywords Search


Priority High
Description Advanced Keywords Search
Reference FR_06
Users User/Customer.
Pre-requisites System is online.
User has internet access.

Steps Open the website

Click on sign in button.


Enter Required information
Click on advance keyword button.

Input
Required
sequence

Expected result Result is


shown

Status Tested, passed.


Negative Test Case

ID Advanced Keywords Search


Priority High
Description Advanced Keywords Search
Reference FR_06
Users User/Customer.

50
Pre-requisites System is online.
User has internet access.

Steps Open the website.

Click on sign in button.


Enter Required information
Click on advance keyword button.

Input
121df

Expected result Invalid dataset

Status Tested, passed.

Get Popular Keywords:

Positive Test Case

ID Get Popular Keywords


Priority High
Description Get Popular Keywords
Reference FR_07
Users User/Customer.
Pre-requisites System is online.
User has internet access.

Steps Open the website

Click on sign in button.


Enter Required information
Click on get popular keyword button.

51
Input
Required
sequence

Expected result Result is


shown

Status Tested, passed.

Negative Test Case

ID Get Popular Keywords


Priority High
Description Get Popular Keywords
Reference FR_07
Users User/Customer.
Pre-requisites System is online.
User has internet access.

Steps Open the website

Click on sign in button.


Enter Required information
Click on get popular keyword button.

Input
No data listed

Expected result No Result is


shown

52
Status Tested, passed.

Popular News:

Positive Test Case

ID Popular News
Priority High
Description Popular News
Reference FR_08
Users User/Customer.
Pre-requisites System is online.
User has internet access.

Steps Open the website

Click on sign in button.


Enter Required information
Click on Popular News keyword button.

Input
Required
sequence

Expected result Result is


shown

Status Tested, passed.

Negative Test Case

ID Popular News
Priority High
Description Popular News
Reference FR_08

53
Users User/Customer.
Pre-requisites System is online.
User has internet access.

Steps Open the website.

Click on sign in button.


Enter Required information
Click on Popular News keyword button.

Input
No news added

Expected result No Result is


shown

Status Tested, passed.

Update news:

Positive Test Case

ID Update news
Priority High
Description Update news
Reference FR_09
Users Admin
Pre-requisites System is online.
User has internet access.

Steps Open the website.

Click on sign in button.

54
Enter Required information
Click on Update news button.

Input
Required news

Expected result Result is


shown

Status Tested, passed.


Negative Test Case

ID Update news
Priority High
Description Update news
Reference FR_09
Users Admin
Pre-requisites System is online.
User has internet access.

Steps Open the website

Click on sign in button.


Enter Required information
Click on Update news button.

Input
Blast is
pakistan6

55
Expected result Not updated

Status Tested, passed.

Delete news:

Positive Test Case

ID Delete news
Priority High
Description Delete news
Reference FR_10
Users Admin
Pre-requisites System is online.
User has internet access.

Steps Open the website

Click on sign in button.


Enter Required information
Click on Delete news button.

Input
Required news

Expected result Result is


shown

Status Tested, passed.


Negative Test Case

56
ID Delete news
Priority High
Description Delete news
Reference FR_10
Users Admin
Pre-requisites System is online.
User has internet access.

Steps Open the website

Click on sign in button.


Enter Required information
Click on Delete news button.

Input
news not
selected

Expected result News not


deleted

Status Tested, passed.

Publish News:
Positive Test Case

ID Publish News
Priority High
Description Publish News

57
Reference FR_11
Users Admin
Pre-requisites System is online.
User has internet access.

Steps Open the website

Click on sign in button.


Enter Required information
Click on Publish News button.

Input
Required news

Expected result Result is


shown

Status Tested, passed.


Negative Test Case

ID Publish News
Priority High
Description Publish News
Reference FR_11
Users Admin
Pre-requisites System is online.
User has internet access.

Steps Open the website.

Click on sign in button.


Enter Required information
Click on Publish News button.

58
Input
Invalid dataset

Expected result Result not


shown

Status Tested, passed.

Fake News:
`
Positive Test Case

ID Fake News
Priority High
Description Fake News
Reference FR_12
Users Admin
Pre-requisites System is online.
User has internet access.

Steps Open the website

Click on sign in button.


Enter Required information
Click on Fake News button.

59
Input
Required news

Expected result Result is


shown

Status Tested, passed.

Negative Test Case

ID Fake News
Priority High
Description Fake News
Reference FR_12
Users Admin
Pre-requisites System is online.
User has internet access.

Steps Open the website

Click on sign in button.


Enter Required information
Click on Fake News button.

Input
Required news

60
Expected result Result not
shown

Status Tested, passed.

5.2 Black Box Test Cases


Black box testing also known as Behavioral Testing, is a software testing method in which the
internal structure/ design/ implementation of the item being tested is not known to the tester.
These tests can be functional or non-functional, though usually functional.
This method is named so because the software program, in the eyes of the tester, is like a black
box; inside which one cannot see. This method attempts to find errors in the following categories:
• Incorrect or missing functions
• Interface errors
• Errors in data structures or external database access
• Behavior or performance errors
• Initialization and termination errors

5.2.1 Equivalence Partitions (EP)


Equivalence class partitioning (EP) is a very widely used method to decrease the number of
possible test cases that are required to test a system.

Login
Variables Valid Classes Invalid Classes
Username 1. Username “xyz”. 1. Alphabets, digits and
2. Case in-sensitive. symbols other than

61
3. Compulsory field. “admin”.
2. Empty Field.
Password 1. Length should be greater 1. Length less than 5
than 8. characters. characters.
2. May contain symbols, 2. Empty field.
alphabets [a-z A-Z] and
digits [0-9].

Search by newspaper
Variables Valid Classes Invalid Classes
newspaper Selection 1. Select the newspaper 1. Containing duplicate
which is not already newspaper into
present in the newspaper List
newspaper list
2. Select the newspaper
which exist in the list
newspaper ID 1. May contain alphabets 1. Containing special
[a-z A-Z] and Numeric character e.g. @ # $
[0-9] 2. Empty field.
newspaper Name 1. Contain alphabets [a-z 1. Containing Numeric [0-
A-Z] 9] and special character
e.g. @ # $
2. Empty field.

Search by date
Variables Valid Classes Invalid Classes
Date May contain alphabets [a-z Containing special character
A-Z] and Numeric [0-9] e.g. @ # $
Empty field.

Search by author by name


Variables Valid Classes Invalid Classes
Author Name 2. Contain alphabets [a-z 3. Containing Numeric [0-
A-Z] 9] and special character
e.g. @ # $

62
4. Empty field.

Publish news
Variables Valid Classes Invalid Classes
Author name 2. Contain alphabets [a-z 3. Containing Numeric [0-
A-Z] 9] and special character
e.g. @ # $
4. Empty field.
News title 3. Contain alphabets [a-z 5. Containing Numeric [0-
A-Z] 9] and special character
e.g. @ # $
6. Empty field.
News Description 1. Contain alphabets [A- 1. Containing Numeric [0-
Z] 9] and special character
2. Not case sensitive e.g. @ # $
3. Compulsory field. 2. Empty field.

Delete news
Variables Valid Classes Invalid Classes
News Selection 1. Select the News which 1. Removing With in
is no more exist in the present news list
trending and become 2. Selecting highly Liked
old News
2. Select Highly Dislike
news

Fake news
Variables Valid Classes Invalid Classes
News Selection 3. Select the News which 3. Flagging the fake news
is has no validity or 4. Selecting authentic news
valid source
4. Select un authenticity
news

63
Update news
Variables Valid Classes Invalid Classes
News Selection 5. Select the News which 5. Update With in present
is is to be updated news list

View single article


Variables Valid Classes Invalid Classes
Article Selection 6. Select the artical which 6. Articles not selected
is exist in the trending
and become old.
7. View as you desired

Advance keyword search


Variables Valid Classes Invalid Classes
newspaper Selection 3. Select the newspaper 2. Containing duplicate
which is not already newspaper into
present in the newspaper List
newspaper list
4. Select the newspaper
which exist in the list
newspaper ID 5. May contain alphabets 3. Containing special
[a-z A-Z] and Numeric character e.g. @ # $
[0-9] 4. Empty field.
newspaper Name 4. Contain alphabets [a-z 7. Containing Numeric [0-
A-Z] 9] and special character
e.g. @ # $
8. Empty field.
Author Name 5. Contain alphabets [a-z 9. Containing Numeric [0-
A-Z] 9] and special character
e.g. @ # $
10. Empty field.
newspaper ID 6. May contain alphabets 7. Containing special
[a-z A-Z] and Numeric character e.g. @ # $
[0-9] 8. Empty field.

64
Get popular news
Variables Valid Classes Invalid Classes
Popular news 8. Select the news which 7. No popular news
is exist in the trending
9. View as you desired

5.2.2 Boundary Value Analysis


A boundary value is an input or output value on the border of an equivalence partition, includes
minimum and maximum values at inside and outside boundaries. Normally Boundary value
analysis is part of stress and negative testing.
BVA for Login:
Email

Invalid [min-1] Valid [min to max] Invalid [max+1]


At least no character At least one character At least no character after
before @. before @. @.
Password

Invalid [min-1] Valid [min to max] valid [max+1]


Length < 8 character Length = 8 character Length > 8 character

Search by newspaper
Newspaper Name

Invalid [min-1] Valid [min to max] Invalid [max+1]


digits [0-9] or special alphabets [a-z A-Z] digits [0-9] or special
character [@, $]. character [@, $].
Newspaper ID

Invalid [min-1] Valid [min to max] Invalid [max+1]


special character [@, $]. alphabets [a-z A-Z] or digits special character [@, $].@.
[0-9]

Newspaper Description

65
Invalid [min-1] Valid [min to max] valid [max+1]
digits [0-9] or special alphabets [a-z A-Z] digits [0-9] or special
character [@, $]. character [@, $].

Search by author name


Author Name

Invalid [min-1] Valid [min to max] Invalid [max+1]


digits [0-9] or special alphabets [a-z A-Z] digits [0-9] or special
character [@, $]. character [@, $].

Search by date
Newspaper date

Invalid [min-1] Valid [min to max] Invalid [max+1]


digits [0-9] or special alphabets [a-z A-Z] digits [0-9] or special
character [/,-]. digits [0-9] Character [@, $].

View single article


artical Name

Invalid [min-1] Valid [min to max] Invalid [max+1]


digits [0-9] or special alphabets [a-z A-Z] digits [0-9] or special
character [@, $]. character [@, $].

Keyword search
keyword

Invalid [min-1] Valid [min to max] Invalid [max+1]


digits [0-9] or special alphabets [a-z A-Z] digits [0-9] or special
character [@, $]. character [@, $].
Update news
Update news

66
Invalid [min-1] Valid [min to max] Invalid [max+1]
digits [0-9] or special alphabets [a-z A-Z] digits [0-9] or special
character [@, $]. character [@, $].

Delete new
Delete news

Invalid [min-1] Valid [min to max] Invalid [max+1]


digits [0-9] or special alphabets [a-z A-Z] digits [0-9] or special
character [@, $]. character [@, $].
Publish news
Publish news

Invalid [min-1] Valid [min to max] Invalid [max+1]


digits [0-9] or special alphabets [a-z A-Z] digits [0-9] or special
character [@, $]. character [@, $].
Fake news
Fake news

Invalid [min-1] Valid [min to max] Invalid [max+1]


digits [0-9] or special alphabets [a-z A-Z] digits [0-9] or special
character [@, $]. character [@, $].

5.2.3 Decision Table Testing


Decision Table is a testing method, which aims to ensure that each one of the possible branch
from each decision point is executed at least once and thereby ensuring that all reachable code is
executed.

5.2.4 State transition Testing


State Transition testing, a black box testing technique, in which outputs are triggered by changes
to the input conditions or changes to 'state' of the system. In other words, tests are designed to
execute valid and invalid state transitions.

Login

67
STATE LOGIN VALID INVALID

S1 Login attempt S2 S3
S2 Homepage
S3 Error message
Search by newspaper
STATE search VALID INVALID

S1 Search attempt S2 S3
S2 Enter id
S3 Error message
Search by date
STATE search VALID INVALID

S1 Search attempt S2 S3
S2 Enter date
S3 Error message
Search by author name
STATE search VALID INVALID

S1 Search attempt S2 S3
S2 Author name
S3 Error message
Advance search
STATE search VALID INVALID

S1 Search attempt S2 S3
S2 Adv search option
S3 Error message
Update news

68
STATE Update VALID INVALID

S1 Update attempt S2 S4
S2 Select news name to be update S3
S3 Update
S4 Error message
Delete news
STATE Delete VALID INVALID

S1 Delete attempt S2 S4
S2 Select news name to be delete S3
S3 delete
S4 Error message
Publish
STATE Publish VALID INVALID

S1 Publish attempt S2 S4
S2 Select news to be publish S3
S3 publish
S4 Error message
Fake news
STATE Fake news VALID INVALID

S1 Fake news attempt S2 S5


S2 Select news name to be S3
flagged fake
S3 flagged S4
S4 Shown on screen
S5 Error message

69
5.2.5 Use Case Testing
Use Case Testing is a functional black box testing technique that helps testers to identify test
scenarios that exercise the whole system on each transaction basis from start to finish.

5.3 White Box Test Cases


White box testing is a testing technique, that examines the program structure and derives test data
from the program logic/code. The other names of glass box testing are clear box testing, open box
testing, logic driven testing or path driven testing or structural testing.

5.3.1 Cyclometric complexity


Cyclometric complexity is a source code complexity measurement that is being correlated
to a number of coding errors. It is calculated by developing a Control Flow Graph of the
code that measures the number of linearly-independent paths through a program module.
Lower the Program's cyclometric complexity, lower the risk to modify and easier to
understand.

Login

70
Cyclomatic Complexity: = E – N + 2P
E=6 N=4 P=1
Cyclomatic complexity = 3
Statement Coverage=1
Decision Coverage=1
Path Coverage=2

71
Search by newspaper

Cyclomatic Complexity: = E – N + 2P
E=6 N=4 P=1
Cyclomatic complexity = 3
Statement Coverage=1
Decision Coverage=1
Path Coverage=2

72
Search by date

Cyclomatic Complexity: = E – N + 2P
E=6 N=4 P=1
Cyclomatic complexity = 3
Statement Coverage=1
Decision Coverage=1
Path Coverage=2

73
Search by author name

Cyclomatic Complexity: = E – N + 2P
E=6 N=4 P=1
Cyclomatic complexity = 3
Statement Coverage=1
Decision Coverage=1
Path Coverage=2

74
Update news

Cyclomatic Complexity: = E – N + 2P
E=6 N=4 P=1
Cyclomatic complexity = 3
Statement Coverage=1
Decision Coverage=1
Path Coverage=2

75
Delete news

Cyclomatic Complexity: = E – N + 2P
E=6 N=4 P=1
Cyclomatic complexity = 3
Statement Coverage=1
Decision Coverage=1
Path Coverage=2

76
Publish news

Cyclomatic Complexity: = E – N + 2P
E=7 N=5 P=1
Cyclomatic complexity = 4
Statement Coverage= 1
Decision Coverage=1
Path Coverage=2

77
Fake news

Cyclomatic Complexity: = E – N + 2P
E=7 N=5 P=1
Cyclomatic complexity = 4
Statement Coverage=1
Decision Coverage=1
Path Coverage=2

78
Get popular news

Cyclomatic Complexity: = E – N + 2P
E=7 N=5 P=1
Cyclomatic complexity = 4
Statement Coverage=1
Decision Coverage=1
Path Coverage=2

5.4 Performance testing


Performance testing is non-functional testing which is used to test the
application’s modules and in case of workload to stable the application. Performance
testing is in general a testing practice performed to determine how a system performs
in terms of responsiveness and stability under a particular workload. It can also serve
to investigate measure, validate or verify other quality attributes of the system, such

79
as scalability, reliability and resource usage. Performance testing, a subset of
performance engineering, is a computer science practice which strives to build
performance standards into the implementation, design and architecture of a system.
In Newser performance testing measures are:
i. There is stability in this application.
ii. Every module works properly.

iii. The design of this application is user


friendly.
iv. This application response time is in
nanoseconds.

5.5 Stress Testing


Stress Testing is used to verified the application stability and reliability; it is used to test
the robustness of the system in extremely heavy conditions. Stress testing a Non-
Functional testing technique that is performed as part of performance testing. During stress
testing, the system is monitored after subjecting the system to overload to ensure that the
system can sustain the stress. The recovery of the system from such phase (after stress) is
very critical as it is highly likely to happen in production environment.
In Newser stress testing results shows:
i. Many users can use this application at one time.
ii. System can bear the load of many users and performance of each user at on single time

5.6 System Testing


System Testing (ST) is a black box testing technique performed to evaluate the
complete system the system's compliance against specified requirements. In System
testing, the functionalities of the system are tested from an end-to-end perspective.
System Testing is usually carried out by a team that is independent of the development
team in order to measure the quality of the system unbiased. It includes both functional
and Non-Functional testing.
In Newser system testing results shows:
i. Each function performs its function according to functional requirements.
ii. Every function is behaving smoothly and fully.

80
5.7 Regression Testing
Regression testing is black box testing technique that consists of re-executing those tests
that are impacted by the code changes. These tests should be executed as often as possible
throughout the software development life cycle

5.7.1 Selecting Regression Tests


• Requires knowledge about the system and how it affects by the existing functionalities.
• Tests are selected based on the area of frequent defects.
• Tests are selected to include the area, which has undergone code changes many a times.
• Tests are selected based on the criticality of the features.

5.7.2 Regression Testing Steps


Regression tests are the ideal cases of automation which results in better Return on Investment
(ROI).
• Select the Tests for Regression.
• Choose the apt tool and automate the Regression Tests
• Verify applications with Checkpoints
• Manage Regression Tests/update when required
• Schedule the tests
• Integrate with the builds
• Analyze the results

81
Chapter 6: Tools and Techniques

1. Passive Aggressive Classifier for Fake News Detection

2. Beautiful Soup module for news scraping

3. Newspaper3k module for extracting different features from news

4. Mongo DB

5. PyMongo for storing/extracting data from DB

6. Pickle(Python library) for loading our trained model

7. Highcharts(JavaScript library) for data visulization

8. Pandas module for preparing datasets

9. Tdidf Vectorizer for extracting features from news

10. NLTK library for frequent keywords extraction

Tools:
1. Visual Studio Code

2. Argo UML

82
Chapter 7: Summary and Conclusion

Summary:
NEWSER is a web-based application which will show readers news articles scraped
from different national and international news websites. Users can search news by selecting
date and all news articles of that day would be displayed. Similarly, users can read news of a
particular newspaper by selecting its name from the list. If user clicks on a particular article,
all articles related to that news would also be shown plus the link to original source. If user
wants to read the articles of a specific author, he/she can do so by typing author name. An
advanced keyword based search is implemented so that users can find specific news by
typing its main keywords. If the user is reading news from any other news website or article,
there is an Artificial Intelligence based Fake News Detection in our application which will tell
our users how much fake or real that news is.

Conclusion:
The main focus of this project is to detect fake news, user will pass the url of the news and system
will scrap the news from that url and pass it to machine learning model and model will predict
weather it is fake or real. The model output will be displayed to user. News will also be store in
DB on the basis of that news pie chart will be generated that will represent the percentage of fake
news. System will also display occurrence of words in the form of wordcloud. User will be able
to search news on the basis of date and Author name and on the basis of keyword system will also
display popular news to user. Another feature is user can give the URL of any news site system
will download all news from that site and detect fake and real news among them.

83
Chapter 8: User Manual

1. Main Screen

a) Main Screen of the website


b) Here User can view all the recent national & international news

2. News Screen
Here news from single newspaper are shown

84
3. Search by Newspaper
Here user can search any specific newspaper

85
4. Search by Area
Here user can search news of any area

86
Chapter 9: Lessons Learnt and Future Work

Lessons Learnt:

I've learnt how to use machine learning model to get prediction on unseen data, learnt about
visualization of charts in js and also about the implementation of data scrapper in python and
deal with MongoDB. Search , insert or delete data from DB. How to use newspaper module of
python to download and extract features from news. I've learnt how to create a web application
using Flask framework of python.

Future Work :

System will run on multiple platforms i.e. Android , ios and web. News scraping sources will be
increased. Results should be displayed using different visualization techniques.

87
References

The Internet links shall be complete URLs to the final article.


[1] https://www.unslanted.net/
[2] https://www.dawnnews.tv/
[3] https://www.bbc.com/news
[4] https://www.bbc.com/news
[5] https://data-flair.training/blogs/advanced-python-project-
detecting-fake-news/
[6] https://realpython.com/beautiful-soup-web-scraper-python/
[7] https://www.highcharts.com/demo/pie-gradient
[8] https://pypi.org/project/newspaper3k/
[9] https://www.w3schools.com/python/python_mongodb_insert.as
p
[10] https://flask.palletsprojects.com/en/1.1.x/
[11] https://www.kaggle.com/datasets

88
Appendix

 A section at the end of a document that includes information that is too detailed for the
text of the document itself and would "burden the reader" or be "distracting," or
"inappropriate" (APA, 2010, p. 38-9).
 The content in the appendices should be "easily presented in print format" (APA, 2010, p.
39).
o Examples:
 lists of length (short lists belong in the document itself)
 detailed descriptions (essential details should be in the document itself)
 a list of articles that support data but are not referred to in the document
itself
 demographic details for subpopulations studied by the document

89

You might also like