Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Therefore, when more people are able to get involved in testing new code, the result is more stable & bug-free code.  Additionally, it increases the speed at which new code can be accepted – allowing us to get more features/fixes in each release of the software.

What Pull Requests should I start with?

If you are less technical, or just getting started, we recommend beginning your testing (or code review) with Pull Requests that contain the "1 Approval" label.  These are smaller Pull Requests that need a very quick test or review (usually a small bug fix or improvement).

You are welcome to test any open pull request.  Even if the pull request is already assigned to other testers, it can help speed up its completion/acceptance if others also test it.

We recommend testing whichever pull requests are of interest to you.  You may find one relating to a bug that you'd also seen, or something that sounds easy for you to test, etc.  The choice is up to you.

Getting Started

Required Software

...

  1. You need a GitHub login.  This lets you add a comment to any PR you test, letting developers know if you found problems or if all your tests were successful.
  2. Install GitHub CLI.  This makes it easier to "checkout" (i.e. download) the PR code so you can test it.
  3. Install Docker Desktop. This is the easiest way to get a DSpace backend installed locally for testing new (frontend or backend) PRs.
    1. NOTE: Docker recently changed their service agreement, but Docker remains free for personal use or non-commercial open source projects like DSpace.
    2. NOTE for Windows 10: Docker Desktop can sometimes become a bit "memory hungry" when it is running.  It's best to either disable the "Start Docker Desktop when you log in" setting (so that you only run it when needed).  Or, if you are using the default WSL2 backend, you can create a ".wslconfig" file in your user directory and limit the amount of memory you let Docker use (at least 4-6GB 8GB is recommended if you can spare it):

      Code Block
      title.wslconfig
      [wsl2]
      memory=6GB8GB


Installing the Backend (on Docker)

...

  1. These test instructions assume you are already running both the Frontend & Backend. If not, follow the instructions above, and then start them both:

    Code Block
    # Start backend
    cd DSpace
    docker-compose -p d7 up -d
    
    # Start frontend
    cd ../dspace-angular
    docker-compose -p d7 -f docker/docker-compose.yml up -d


  2. Move into the directory where your Frontend code is:

    Code Block
    cd dspace-angular


  3. Find the number of the Pull Request you want to test (it'll be the "#[number]" displayed after the PR name, or the end of the PR's URL).  Checkout the code from that PR using it's number: 

    Code Block
    # This would checkout https://github.com/DSpace/dspace-angular/pull/1383 for testing
    gh pr checkout 1383


  4. Now, rebuild & restart your frontend based on that PR's code:

    Code Block
    docker-compose -p d7 -f docker/docker-compose.yml up -d --build
    # Even after the build completes, it makemay take a few minutes for the frontend to restart
    
    # You can check the status using "logs -f"
    docker-compose -p d7 -f docker/docker-compose.yml logs -f
    # (Click Ctrl+C to exit logs view)


  5. Now test the User Interface to see if the changes made in that PR look to work properly.  The PR's description should describe how to test it and what you should see.
    1. If you notice any odd behavior, check for errors in the UI using your browser's DevTools. See Troubleshoot an error#FindingtheErrorMessageintheUserInterface
    2. Based on what you find, add a comment to the PR. If it works, congratulate the developer. If it doesn't, let them know the error you saw (and what you clicked on when that error occurred).

...

NOTE: While this shuts down the Docker containers, all the data/files/user accounts you created will be retained (and will appear the next time to start the containers)

Code Block
# From your local "DSpace" folder run. This stops BOTH the frontend and the backendStop the backend
cd DSpace
docker-compose -p d7 down

# NOTE:Stop Youthe also can stop both from your "dspace-angular" folder, but the command is slightly longer:
# frontend
cd ../dspace-angular
docker-compose -p d7 -f docker/docker-compose.yml down

...

Code Block
# First, shutdown everything that's running in Docker
docker stop $(docker ps -a -q)

# Now, delete all Docker containers from your machine
docker rm $(docker ps -a -q)

# Remove all Docker volumes (data) from your machine
docker volume rm $(docker volume ls -q)

# Finally, you may delete the "DSpace" and "dspace-angular" folders if you no longer wish to use them.
# You may also uninstall Docker Desktop as needed, etc and GitHub CLI if you wish.