AJAX online music website (5) test and ajax online music test

Source: Internet
Author: User

AJAX online music website (5) test and ajax online music test

Requirements, function structure, database design, and function implementation are all summarized. Haha, It's like building a house, feng shui has been seen, the foundation has been laid, the orientation of the house has been decided, the walls have been built, and the paint has been painted. Well, OK. It's time to live in the house. If you want to see what my house looks like, you can see my previous blog posts:

1. AJAX online music website (1) requirements and functional structure

2. AJAX online music website (2) database and development environment

3. AJAX online music website (3) Part one function implementation

4. AJAX online music website (4) Part two function implementation

Today, I plan to summarize the tests on several modules of the website. All my tests are simple black box tests. (If you need project source code, click the upper right corner to contact me, or leave your email in the comment, and I will package it for you ). 

PS: I have read several blog posts about testing a few days ago. They write very well. They are definitely big players in the software testing industry, I have a deep understanding of the testing methods, work nature, and work of large and small companies, and have a strong guidance for beginners who are confused about testing. I also put down the addresses of several blog posts, if you are interested, you can see that it takes more than an hour to get the result.

1. My personal understanding of the software testing Industry 1

2. My personal understanding of the software testing Industry 2

3. My personal understanding of the software testing industry 3

4. My personal understanding of the software testing industry 4

 

8. Website Testing

A. login Registration

To ensure that the website login and registration functions are normal, test cases for registration and logon are designed separately. The specific use cases are shown in table 8.1.

Table 8.1 logon registration test cases

Case No.

Test Input

Execution prerequisites

Expected output

1

In the logon area, enter the Administrator account and password, and click log on.

The user has opened the homepage of the website;

The account and password are entered correctly.

Go to the background Maintenance and Management page

2

In the logon area, enter your normal account and password, and click log on.

The user has opened the homepage of the website;

The account and password are entered correctly.

The page jumps to the front-end page and shows that the user has logged on

3

Enter the wrong user account and password in the logon area, and click log on.

The user has opened the homepage of the website.

Incorrect account and password

The page jumps to the front-end page and prompts "incorrect account and password"

4

Click "register ".

1. the user has opened the homepage of the website.

Page jump to registration page

5

Enter the user ID on the registration page

The user has entered the registration homepage.

Enter the user ID

The page prompts "whether the user name already exists"

6

Enter user E_mail on the registration page

The user has entered the registration homepage.

Enter E_mail

The page prompts "Whether the E_mail format is correct"

7

Enter the registration page Password

The user has entered the registration homepage.

The two passwords are different.

The page prompts "two passwords are different"

8

Click Add

The user has entered the registration homepage.

Enter correct information

The page prompts "successfully added"

B. Search

To ensure the normal availability of the website search function, design and execute test cases such as Table 8.2.

Table 8.2 search function test cases

Case No.

Test Input

Execution prerequisites

Expected output

1

Enter the full name of the song in the search area.

The user has opened the homepage of the website;

Select "song name" for "search type ".

This song exists on the website

Go to the search page and display the song Information

2

Enter a part of the song name in the search area

The user has opened the homepage of the website;

Select "song name" for "search type ".

This song exists on the website

Go to the search page and display the song Information

3

Enter the full name of the artist in the search area.

The user has opened the homepage of the website;

Select singer as the search type.

This song exists on the website

Go to the search page and display the corresponding song information of the artist.

4

Enter the name of a singer in the search area

The user has opened the homepage of the website;

Select singer as the search type.

This song exists on the website

Go to the search page and display the corresponding song information of the artist.

5

Enter the full name of the album in the search area.

The user has opened the homepage of the website;

Select album as the search type.

This song exists on the website

Go to the search page and display the corresponding album songs.

6

Enter the album name in the search area.

The user has opened the homepage of the website;

Select album as the search type.

This song exists on the website

Go to the search page and display the corresponding album songs.

7

Enter a nonexistent song or artist in the search area. Album

The user has opened the homepage of the website;

Select album as the search type.

This song, artist, and album does not exist on the website.

Go to the search page and display "no related files found"

C. Display songs

To ensure the normal availability of the website song display function, design and execute test cases such as table 8.3.

Table 8.3 Test Cases of Song display

Case No.

Test Input

Execution prerequisites

Expectation

1

Click music ranking

The user has opened the homepage of the website.

 

Displays music rankings in descending order of total traffic

2

Click singer ranking

1. the user has opened the homepage of the website.

Display the ranking information of singers in descending order of total visits

3

Click album ranking

1. the user has opened the homepage of the website.

Displays the list of albums in descending order of total visits.

4

Click the name of the music ranking

1. the user has opened the homepage of the website.

Jump to the song play page and play this song

5

Click Download button for music ranking songs

1. the user has opened the homepage of the website.

Pop-up download prompt box

6

Click music ranking to add to favorites

The user has opened the homepage of the website.

User logged on

This song has not been added to your favorites

The pop-up prompt "favorites successful!" appears !"

7

Click music ranking to add to favorites

The user has opened the homepage of the website.

User not logged on

The prompt "not logged on, please log on first!" is displayed !"

8

Click music ranking to add to favorites

1. the user has opened the homepage of the website.

2. the user has logged on

3. The song has been added to the user's favorites.

In the pop-up prompt box, "you have already added your favorites!

9

Click my favorites

The user has opened the homepage of the website.

User logged on

Show the favorite songs of this user

10

Click my favorites

The user has opened the homepage of the website.

User not logged on

 

"You have not logged on yet. Please log on first !"

D. The administrator maintains and manages songs.

To ensure that the maintenance and management functions of the website administrator are available, design and execute the following Table 8.4 test cases.

Table 8.4 administrator Maintenance and Management Function Test Cases

Case No.

Test Input

Execution prerequisites

Expected output

1

Click music to add

1. The administrator has logged on to the website background.

Jump to the music add page

2

Click the Browse button on the music add page.

The Administrator has logged on to the website background.

The Administrator has entered the music add page.

Pop-up select Add file box

3

Click the Add button on the music add page.

The Administrator has logged on to the website background.

The Administrator has entered the music add page.

All information is filled in correctly

The prompt is correct. Go back to the homepage and add the song to the music ranking.

4

Click the Add button on the music add page.

The Administrator has logged on to the website background.

The Administrator has entered the music add page.

Information not filled or incorrect

The prompt is displayed and the prompt is correct.

5

Click music to modify

1. The administrator has logged on to the website background.

Go to the music modification page

6

Click Delete on the music modification page.

The Administrator has logged on to the website background.

The Administrator has entered the music modification page.

In the pop-up dialog box "delete record", click "OK" and return to the front-end page. This song is deleted in the music ranking list.

7

Click Modify music button

The Administrator has logged on to the website background.

The Administrator has entered the music modification page.

Go to the music modification page. The song information displayed on the page is correct.

8

Click Edit

1. The administrator has logged on to the website background.

Jump to the album modification page

9

Click Delete on the album modification page.

The Administrator has logged on to the website background.

The Administrator has entered the album modification page.

In the pop-up dialog box "delete record", click "OK" and return to the foreground page. The album has been deleted in the album ranking.

10

Click the modify button of the album.

The Administrator has logged on to the website background.

The Administrator has entered the album modification page.

Jump to the album modification page. The album information displayed on the page is correct.

11

Click Modify

1. The administrator has logged on to the website background.

Go to the artist's modification page

12

Click the delete button on the artist modification page.

The Administrator has logged on to the website background.

The Administrator has entered the artist modification page.

In the pop-up dialog box "delete record", click "OK" and return to the front-end page. The singer has been deleted in the ranking list [24].

13

Click the modify button of the artist.

The Administrator has logged on to the website background.

The Administrator has entered the artist modification page.

Go to the singer modification page. The information displayed on the page is correct.

14

Click to exit

1. The administrator has logged on to the website background.

Log out of the background management and return to the website homepage.


Test HTML5 websites?

We recommend that you use the browser of the latest official version of aoyou. After website evaluation, the HTML5 support score of aoyou 3.3 is 347 points, which is 41 points higher than the previous 3 score, compared with the previous "champion"-Chrome14, it also scored 7 points higher.

An error occurred while accessing different websites using Ajax.

Anyone who has worked on Ajax development across multiple websites knows that if we want to use Ajax on website A to obtain specific content on website B, if website A and website B are not in the same domain, A cross-origin access problem occurs. Cross-origin access of Ajax is a common problem for existing Ajax developers.

For cross-origin access, IE prompts a warning box to remind you. If a user adds the website to a trusted website or lowers the security level, IE will not remind you of this issue.

If FireFox or other non-Microsoft browsers encounter cross-origin access, the solution is to reject access.

Some people say that IE is a mainstream browser, as long as it can be used normally. Although IE can handle this problem, there is a premise that you can either click yes after the warning box pops up on the page (click NO to execute the Ajax call ), you can either add the website to a trusted site. These two methods are common in the application of enterprise management systems, because the system administrator can use administrative means to ensure user behavior. However, this approach does not work for website or portal development on the Internet.

I recently encountered this problem. I need to finish some special effects on the main window after cross-origin access, search for some materials, and perform compatibility tests in different browsers, several feasible solutions are found:

1. Web proxy method. That is, the cross-origin access requests to website B generated when you access website A are submitted to the specified page of website A. The page replaces the user page to complete interaction and return appropriate results. This solution can solve most of the Cross-origin access problems that can be considered at this stage, but requires website A to provide support for Web Proxy. Therefore, website A and website B must work closely together, in each interaction process, the server load of website A increases and the session status cannot be saved on behalf of users.

2. on-Demand mode. MYMSN portal uses this method, but MYMSN does not involve cross-origin access. Dynamically control the generation of script tags. You can call cross-origin pages by modifying the src attribute of script tags. This solution has the defect that the get method is adopted when the src attribute of the script completes the call. If the string passed during the request is too large, it may fail to run normally. However, this solution is very suitable for aggregation portals.

3. iframe mode. After checking a post about cross-origin access on javaeye, he mentioned that he has used iframe to solve cross-origin access problems. The iframe method can be used to submit and obtain data. However, because the parent window cannot interact with the Child Window (in the case of cross-origin access, this interaction is denied ), therefore, the effect on the parent window cannot be completed.

4. Local User dump mode: the feature that IE is attached to the windows platform provides us with an iframe-based "Bypass" solution using memory, that is, data can be transmitted between two windows through the windows clipboard on the client. You only need to set Interval on the receiving side for polling. After obtaining the result, you can clear Interval. The platform independence of FF determines that it does not support the clipboard method. In the previous versions of FF, the plug-in vulnerability has been fixed, so FF cannot complete the dark Data Warehouse through memory. Because the file operation FF does not provide support (data transmission cannot be completed through Cookie cross-origin), this technical method can only be used in IE.

5. My own method to solve this type of problem: in combination with the previous methods, when accessing website A, I first request website B to complete data processing, and then obtain the desired result based on the returned ID. The disadvantage of this method is also obvious, and the load of website B is increased. The session is also maintained, and the interaction between website A and website B is enhanced. Most importantly, this solution satisfies all my needs.

To sum up, I recommend the on-Demand method when you can select the above scheme. This method can solve most of your problems without submitting a large amount of data.
References:... the remaining full text>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.