YouSource system testing plan Verso project 21th May 2010 (Edited layout and wording and added some paragraps 2.6.2010. Test cases are still essentially the same and have the same numbering as before.) I Testing Practices and Data Introduction YouSource is source code publishing system developed by Verso project. YouSource is based on existing Gitorious application, which uses Ruby on Rails framework and is licensed under AGPLv3. This document describes the system testing plan to ensure systematically that the application works correctly. The goal is not just to ensure the modifications made by Verso project work correctly, but to ensure that the whole system works correctly. Testing Report The report should begin with the following information about testing: the people who perform the testing, the version of this test plan, the version of the application as a commit hash and all the essential information about test environment. About test environment one should report at least what software is used (OS, browser, etc) and what hardware is used. As for the test cases, one should use the same numbering and headlines as in this document. Of each test case, the number, headline, result and the possible additional observations should be included. The results can be presented in a table for example. Data for Testing: The following entities are required to validate the test cases defined below. User names are imaginary but Korppi users should be used for tests (currently only Korppi users can even log in). Test data to be pushed to repositories can be any files, text files for example. USERS: Matti, Antti, Ville, Lassi and Jussi. TEAMS: MAV (Matti, Antti, Ville) PROJECTS: Name Owner Publicity ------------------------------------------------- p-pub-mav MAV (team) world p-site-mav MAV (team) site p-pri-mav MAV (team) members REPOSITORIES: Viewers refers to users that have been given view right to the repository in 'Manage collaborators' -page. Only team members have commit right for repositories owned by a team. Name Under project Publicity Viewers ----------------------------------------------------------------- r-pub1-mav p-pub-mav public Matti, Antti, Jussi r-pub2-mav p-site-mav public Matti, Antti, Jussi r-pub3-mav p-pri-mav public Matti, Antti, Jussi r-pri1-mav p-pub-mav private Matti, Antti, Jussi II Test Cases Test cases are separated into categories. They are numbered using three dimensional numbering, for example 1.1.1. All test cases are designed to be clearly passed, failed or not carried out. If there are any additional observations they should be written down too. 1 BASIC FUNCTIONALITIES Functionalities tested in this section are very basic and have frequently been used during development. They are also very simple to understand for anyone who has worked with the application. Therefore, just one sentence should be enough to describe the test cases. 1.1 Authentication 1.1.1 User can log in and out with his/her Korppi credentials. 1.1.2 User cannot log in without matching Korppi credentials. 1.2 Functionalities for a logged in user 1.2.1 User can edit his/her personal information. 1.2.2 User can add an SSH key. 1.2.3 User can create a project and edit its information. 1.2.4 User can create a repository and edit its information. 1.2.5 User can create a team and edit its information. 1.2.6 User can update repository's metainformation by pushing. 1.2.7 User can delete a project. 1.2.8 User can delete a repository. 1.2.9 User can delete an SSH key. 2 ACCESS RIGHTS AND LIMITATIONS 2.1 WWW-interface 2.1.1 Private repository is unaccessible for anonymous viewer or any user without view right. Repository in question: r-pri1-mav Preconditions: - The user isn't logged in or is not a viewer of the repository, i.e. user is not in {Matti, Antti, Jussi}. Steps: - The user tries to open repository page by direct URL: /p-pub-mav/r-pri1-mav - The user tries to open repository atom feed by direct URL. /p-pub-mav/r-pri1-mav.atom Postconditions: - In every step, the system denied access and showed error message. 2.1.2 Private repository isn't listed for anonymous viewer or any user without view right. Repository in question: r-pri1-mav Preconditions: - The user isn't logged in or is not a viewer of the repository, i.e. user is not in {Matti, Antti, Jussi}. Steps: - The user opens the corresponding public project's page: /p-pub-mav - The user opens repository listing: /repositories - The user searches with the repository's name as search term. - The user searches with the corresponding project's name as search term. Postconditions: - Link or mention of the private repository wasn't shown in any page that was visited during steps. 2.1.3 Private repository is accessible for users with view right. Repository in question: r-pri1-mav Preconditions: - The user is logged in and is a viewer of the repository, i.e. user is in {Matti, Antti, Jussi}. Steps: - The user tries to open repository page: /p-pub-mav/r-pri1-mav - The user tries to open repository atom feed: /p-pub-mav/r-pri1-mav.atom Postconditions: - In every step, the repository contents were accessible. 2.1.4 Private repository is listed in corresponding project page for users with view right. Repository in question: r-pri1-mav Preconditions: - The user is logged in and is a viewer of the repository, i.e. user is in {Matti, Antti, Jussi}. Steps: - The user opens corresponding project's page: /p-pub-mav Postconditions: - In every step, the repository was listed. 2.1.5 Public repository under private project is unaccessible for anonymous viewer or any user without project membership. Repository in question: r-pub3-mav Preconditions: - The user isn't logged in or is not a member of the project, i.e. user is not in {Matti, Antti, Ville}. Steps: - The user tries to open repository page by direct URL: /p-pri-mav/r-pub3-mav - The user tries to open repository atom feed by direct URL. /p-pri-mav/r-pub3-mav.atom Postconditions: - In every step, the system denied access and showed error message. 2.1.6 Public repository under private project isn't listed for anonymous viewer or any user without project membership. Repository in question: r-pub3-mav Preconditions: - The user isn't logged in or is not a member of the project, i.e. user is not in {Matti, Antti, Ville}. Steps: - The user opens the corresponding public project's page: /p-pri-mav - The user opens repository listing: /repositories - The user searches with the repository's name as search term. - The user searches with the project's name as search term. Postconditions: - Link or mention of the private repository wasn't shown in any page that was visited during steps. 2.1.7 Public repository under private project is accessible for users with project membership. Repository in question: r-pub3-mav Preconditions: - The user is logged in and is a member of the project, i.e. user is in {Matti, Antti, Ville}. Steps: - The user opens repository page: /p-pri-mav/r-pub3-mav - The user opens repository atom feed: /p-pri-mav/r-pub3-mav.atom Postconditions: - In every step, the repository contents were accessible. 2.1.8 Public repository under private project is listed for users with project membership in the project page. Repository in question: r-pub3-mav Preconditions: - The user is logged in and is a member of the project, i.e. user is in {Matti, Antti, Ville}. Steps: - The user opens project's page: /p-pri-mav Postconditions: - In every step, the repository was listed. 2.1.9 Private project is unaccessible for anonymous viewer or any non-members. Project in question: p-pri-mav Preconditions: - The user isn't logged in or is not a member of the project, i.e. user is not in {Matti, Antti, Jussi}. Steps: - The user tries to open repository page by direct URL: /p-pri-mav - The user tries to open repository atom feed by direct URL. /p-pri-mav.atom Postconditions: - In every case, the system denied access and showed error message. 2.1.10 Private projects aren't listed for anonymous viewer or any non-members. Projects in question: p-pri-mav Preconditions: - The user isn't logged in or is not a member of the project, i.e. user is not in {Matti, Antti, Jussi}. Steps: - The user opens the project page: /p-pri-mav - The user opens projects listing: /projects - The user searches with the project's name as search term. Postconditions: - When trying to access the project page, the system denied access and showed error message. - Link or mention of the project wasn't shown in any page that was visited. 2.1.11 Private project is accessible for project members. Project in question: p-pri-mav Preconditions: - The user is logged in and is a member of the project, i.e. user is in {Matti, Antti, Jussi}. Steps: - The user opens project page: /p-pri-mav - The user opens project atom feed: /p-pri-mav.atom Postconditions: - In every step, the project's contents were accessible. 2.1.12 Private projects are listed in project's owner's home page. Project in question: p-pri-mav Preconditions: - User is logged in. - User is the owner of the project. Steps: - User opens his/her home page. Postconditions: - The project was listed under "Your projects". 2.1.13 Project that is public to site is not accessible or listed for users not logged in. Project in question: p-site-mav Preconditions: - The user is not logged in. Steps: - User tries to open project page by direct URL: /p-site-mav - User opens Projects page. - User searches with the project's name as search term. Postconditions: - When trying to open project page the system denied access and showed error message. - Link or mention of the project wasn't shown in any page that was visited during steps. 2.1.14 Public repository under project public to site is not accessible or listed for users not logged in. Repository in question: r-pub2-mav Preconditions: - The user is not logged in. Steps: - User tries to open repository page by direct URL: /r-pub2-mav - User opens Repositories page. - User searches with the repository's name as search term. - User searches with the project's name as search term. Postconditions: - When trying to open repository page the system denied access and showed error message. - Link or mention of the repository wasn't shown in any page that was visited during steps. 2.2 Git usage 2.2.1 User without commit right cannot push to repository. Repository in question: r-pub1-mav Preconditions: - User has added a working SSH key for authentication. - User doesn't have commit right to the repository, i.e. user is not in {Matti, Antti, Ville}. Steps: - User attempts to push to repository using Git: git push git@SERVER:p-pub-mav/r-pub1-mav.git Postconditions: - Pushing fails. 2.2.2 User with commit right can push to repository. Repository in question: r-pub1-mav Preconditions: - User has added a working SSH key for authentication. - User has commit right to the repository, i.e. user is in {Matti, Antti, Ville}. Steps: - User attempts to push to repository using Git: git push git@SERVER:p-pub-mav/r-pub1-mav.git Postconditions: - Pushing succeeds. 2.2.3 Private repository cannot be cloned anonymously. Repository in question: r-pri1-mav Preconditions: - User doesn't have an ssh key. Steps: - User attempts git clone with direct private repository URL: git clone git://SERVER/p-pub-mav/r-pri1-mav.git Postconditions: - Cloning fails, since the repository isn't served at all with Git protocol. 2.2.4 Private repository cannot be cloned by users without view right. Repository in question: r-pri1-mav Preconditions: - User has added a working SSH key for authentication. - User doesn't have view right to repository r-pri1-mav, i.e. user is not in {Matti, Antti, Jussi}, e.g. Lassi Steps: - User attempts git clone with direct private URL for private repository: git clone git://SERVER/p-pub-mav/r-pri1-mav.git Postconditions: - Cloning fails, since the user has not view access to the repository. 2.2.5 Private repository can be cloned by users with view right. Repository in question: r-pri1-mav Preconditions: - User has added a working SSH key for authentication. - User has view right to repository r-pri1-mav, e.g. Antti Steps: - User attempts git clone with direct private URL for private repository: git clone git://SERVER/p-pub-mav/r-pri1-mav.git Postconditions: - Cloning succeeds. 3 ALTERNATIVE UPDATING METHODS 3.1 Creating new repository 3.1.1 Repository can be initialized with contents of uploaded ZIP file. Preconditions: - User is logged in. - User has a project that he/she administers. Steps: - User opens new repository creation page. - User fills the form and uploads a ZIP package to initialize the repository with. Postconditions: - The repository is created and contains the contents of given ZIP package. 3.2 Mirroring options 3.2.1 Repository can be created as a mirror of a ZIP package. Preconditions: - User is logged in. - User has a project that he/she administers. - A ZIP file behind a URL is available for testing. Steps: - User opens new repository creation page. - User enables repository mirroring with ZIP URL. Postconditions: - The repository is created and contains the contents of the specified ZIP package. - The repository is automatically updated with new contents when the remote ZIP package changes. (*) *) The mirroring script can be run to test this without waiting. Normally the script is run automatically at set intervals. 3.2.2 Repository can be created as a mirror of a SVN repository. Preconditions: - User is logged in. - User has a project that he/she administers. - Public SVN repository is available for testing. Steps: - User opens new repository creation page. - User enables repository mirroring with SVN URL. Postconditions: - The repository is created and contains the contents of the specified SVN repository. - The repository is automatically updated with new contents when the remote SVN repository changes. (*) *) The mirroring script can be run to test this without waiting. Normally the script is run automatically at set intervals. 3.3 Updating repository using WWW-interface 3.3.1 Repository contents can be updated by uploading a ZIP file or by giving URL to a ZIP file. Repository in question: r-pub1-mav Preconditions: - User is logged in. - User has commit right to the repository. - A ZIP file behind a URL is available if not uploading it. Steps: - User opens 'Update repository with zip' -page. - User uploads a ZIP file or defines a URL to a ZIP file. Postconditions: - The repository's contents were updated with the contents of the provided ZIP file. - The new version of contents is stored in a new commit. 3.3.2 A single file can be added or updated by uploading it in any source tree page. Repository in question: r-pub1-mav Preconditions: - User is logged in. - User has commit right to the repository. Steps: - User opens some source tree page of the repository. - User uploads a file. Postconditions: - The uploaded file was added to the repository, or it has replaced a file if the file names are the same. - The new version of contents was stored in a new commit.