Fyp Phase 1 & 2 Documentation
Fyp Phase 1 & 2 Documentation
Project ID:
Submitted By
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.
Signature: …………………………
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.
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
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
viii
Table of Content
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.
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
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
ID: FR_01
Name: Signup
Description Input Output Requirements Basic work flow
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.
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.
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.
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
8
2.2.4 Constraints
Users must have working internet connection and some means i-e computer/mobile to access the
internet.
• 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
Login
User
12
Click the “Login” button
from the interface.
Alternate Flow
Table 6 Use case Login
13
Use Case 3: Search by Date
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
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
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
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
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
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
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
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
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.
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
24
Figure 24 Architecture Diageam
25
4.3 Data Flow diagram
Data flow diagram includes two levels
26
Figure 17 Class Diagram
27
4.5 Activity Diagram
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
32
SSD for Browse by Date
33
SSD for Browse by Author’s name
34
SSD for Viewing Popular Articles
35
SSD for Viewing Single Article
36
4.7 Collaboration Diagram
4.7.1 Collaboration Diagram Keyword
37
4.7.3 Collaboration Diagram Date
38
4.7.5 Collaboration Diagram Update Article
39
4.8 State Transition Diagram
40
4.9 Component Diagram
41
4.10 Deployment Diagram
42
Chapter 5: Testing
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
Input Incident
accident
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
Input “nestle”
44
Search By Author’s name:
Input
45
Priority High
Description Search By Author’s name
Reference FR_03
Users User/Customer.
Pre-requisites System is online.
User has internet access.
Input
Ali haider 7
Search By Date:
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.
Input
Name
Date
Id
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.
47
Input
11@2020
Input
No input
48
Expected result Result is
shown
Input
No input
49
Advanced Keywords Search:
Input
Required
sequence
50
Pre-requisites System is online.
User has internet access.
Input
121df
51
Input
Required
sequence
Input
No data listed
52
Status Tested, passed.
Popular News:
ID Popular News
Priority High
Description Popular News
Reference FR_08
Users User/Customer.
Pre-requisites System is online.
User has internet access.
Input
Required
sequence
ID Popular News
Priority High
Description Popular News
Reference FR_08
53
Users User/Customer.
Pre-requisites System is online.
User has internet access.
Input
No news added
Update news:
ID Update news
Priority High
Description Update news
Reference FR_09
Users Admin
Pre-requisites System is online.
User has internet access.
54
Enter Required information
Click on Update news button.
Input
Required news
ID Update news
Priority High
Description Update news
Reference FR_09
Users Admin
Pre-requisites System is online.
User has internet access.
Input
Blast is
pakistan6
55
Expected result Not updated
Delete news:
ID Delete news
Priority High
Description Delete news
Reference FR_10
Users Admin
Pre-requisites System is online.
User has internet access.
Input
Required news
56
ID Delete news
Priority High
Description Delete news
Reference FR_10
Users Admin
Pre-requisites System is online.
User has internet access.
Input
news not
selected
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.
Input
Required news
ID Publish News
Priority High
Description Publish News
Reference FR_11
Users Admin
Pre-requisites System is online.
User has internet access.
58
Input
Invalid dataset
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.
59
Input
Required news
ID Fake News
Priority High
Description Fake News
Reference FR_12
Users Admin
Pre-requisites System is online.
User has internet access.
Input
Required news
60
Expected result Result not
shown
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.
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
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
Search by newspaper
Newspaper Name
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 date
Newspaper date
Keyword search
keyword
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
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
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.
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
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.
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
81
Chapter 6: Tools and Techniques
4. Mongo DB
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
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
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