Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ahamedsabuj 201732120141 testing document added #34

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions service.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,11 @@ def author(author_id):
comments = Comment.query.order_by(Comment.time.desc()).filter_by(author_id=author_id).all()
return render_template('author.html', articles=articles, comments=comments, Tool=Tool)

@app.route('/recent')
def sort_articles():
articles = Article.query.order_by(Article.time.desc()).all()
return render_template("recentlyuploaded.html", articles=articles)

if __name__ == '__main__':
app.run(debug=True)

Expand Down
34 changes: 34 additions & 0 deletions srs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@RQ01
Users can find the recently uploaded articles sorted by time .

@RQ02
If a user enter a lewd article , the system should ban the user email .

@RQ03
Users can search for an article by its abstract.

@RQ04
Users can search for an article by its time.

@RQ05
Users can like/dislike each comment once only.

@RQ06
if a user upload a heavy file the system should be able to show an alert message

@RQ07
The allowed uploaded file format should be PDF with extension .pdf only.

@RQ08
If the uploaded file format is not .pdf, the system should alert the user.

@RQ09
User should be able to search for an article by its author

@RQ010
If a user enter an incorrect email , the system should alert the user to try a valid email.

@RQ011
Users should be able to search for an article by its title.


18 changes: 18 additions & 0 deletions templates/recentlyuploaded.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% extends "template.html" %}
{% block content %}
{% if articles%}
<table class="table table-hover table-striped">
<tr>
<th>subject</th>
<th>title</th>
<th>time</th>
</tr>
{% for article in articles %}
<td><a href="/subject/{{ article.subject_id }}">{{ article.subject.name }}</a></td>
<td><a href="/article/{{ article.id }}">{{ article.title }}</a></td>
<td>{{ article.time.strftime("%Y-%m-%d %H:%M") }}</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% endblock %}
5 changes: 4 additions & 1 deletion templates/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@
</li>
<li class="nav-item">
<a class="nav-link" href="/donation">Donation</a>
</li>
</li>
<li class="nav-item">
<a class="nav-link" href="/recent">Recent articles</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/admin">admin</a>
</li>
Expand Down
265 changes: 265 additions & 0 deletions test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
@T001

Test title: test case for requirement 1

Test for: RQ01

Description: recently uploaded articles feature .

Rationale: Confirm that the articles are listed by time .

Input: click

Expected output: Articles listed by time

Actual output: As expected

Diagnosis: None.

Status: P

Signature: sabuj

Date: 2020-05-26


@T002

Test title: test case for requirement 2

Test for: RQ02

Description: Testing if a user enter a lewd article , the system should ban the user email ..

Rationale: Confirm that a user is banned after uploading undesirable article

Input: lewd articles

Expected output: user is banned

Actual output: As expected

Diagnosis: None.

Status: P

Signature: sabuj

Date: 2020-05-27

@T003

Test title: test case for requirement 3

Test for: RQ03

Description: Testing search by article's abstract.

Rationale: Confirm that a user can search by abstract.

Input: This lab is a follow-up to Lab 2

Expected output: Article titled Learn Python Two

Actual output: As expected

Diagnosis: None.

Status: P

Signature: sabuj

Date: 2020-05-27

@T004

Test title: test case for requirement 4

Test for: RQ04

Description: Testing search by article's time.

Rationale: Confirm that a user can search by time.

Input: 10/05/2019

Expected output: Article titled

Actual output: None.

Diagnosis: The system can't find results by article's time.

Status: F

Signature: sabuj

Date: 2020-05-28

@T005

Test title: test case for requirement 5

Test for: RQ05

Description: Testing whether a user can like a comment.

Rationale: Confirm that a user can like comments.

Input: Click Like button.

Expected output: Like count increases.

Actual output: As expected

Diagnosis: None.

Status: P

Signature: sabuj

Date: 2020-05-28

@T006

Test title: test case for requirement 6

Test for: RQ06

Description: Testing if a user upload a heavy file the system should be able to show an alert message .

Rationale: A user may upload a heavy useless file .

Input: upload heavy file.

Expected output: Alert message notifying the user to not upload file exceeding 600 mb.

Actual output: As expected

Diagnosis: None.

Status: P

Signature: sabuj

Date: 2020-05-29

@T007

Test title: test case for requirement 7

Test for: RQ07

Description: Testing uploading files of PDF format.

Rationale: Users are allowed to upload PDF files only.

Input: Upload PDF file.

Expected output: File is uploaded successfuly.

Actual output: As expected

Diagnosis: None.

Status: P

Signature: sabuj

Date: 2020-05-29

@T008

Test title: test case for requirement 8

Test for: RQ08

Description: Testing uploading files of non PDF format.

Rationale: Users are not allowed to upload non PDF files.

Input: Upload DOC file.

Expected output: Alert message

Actual output: As expected

Diagnosis: None.

Status: P

Signature: sabuj

Date: 2020-05-29

@T009

Test title: test case for requirement 9

Test for: RQ09

Description: Testing User should be able to search for an article by its author
.

Rationale: Users should be able to search an article by its author.

Input: search.

Expected output: list of articles

Actual output: As expected

Diagnosis: None.

Status: P

Signature: sabuj

Date: 2020-05-29

@T0010

Test title: test case for requirement 10

Test for: RQ010

Description: Testing If a user enter an incorrect email , the system should alert the user to try a valid email..

Rationale: Users are not allowed to enter invalid email.

Input: invalid email.

Expected output: Alert message

Actual output: As expected

Diagnosis: None.

Status: P

Signature: sabuj

Date: 2020-05-29

@T0011

Test title: test case for requirement 8

Test for: RQ011

Description: Testing Users should be able to search for an article by its title..

Rationale: Users are not allowed to upload non PDF files.

Input: Upload DOC file.

Expected output: Alert message

Actual output: As expected

Diagnosis: None.

Status: P

Signature: sabuj

Date: 2020-05-29
Loading