{"id":31660411,"url":"https://github.com/grycap/oscar-tests","last_synced_at":"2025-10-07T17:06:48.475Z","repository":{"id":274016534,"uuid":"869476016","full_name":"grycap/oscar-tests","owner":"grycap","description":"OSCAR Testing Suite","archived":false,"fork":false,"pushed_at":"2025-10-03T07:54:18.000Z","size":183,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-03T09:29:34.418Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"RobotFramework","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grycap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-08T11:10:01.000Z","updated_at":"2025-10-01T17:33:39.000Z","dependencies_parsed_at":"2025-02-14T08:29:16.132Z","dependency_job_id":"3af4b126-18de-4ecf-90d1-0523771aef1f","html_url":"https://github.com/grycap/oscar-tests","commit_stats":null,"previous_names":["grycap/oscar-tests"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/grycap/oscar-tests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grycap%2Foscar-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grycap%2Foscar-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grycap%2Foscar-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grycap%2Foscar-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grycap","download_url":"https://codeload.github.com/grycap/oscar-tests/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grycap%2Foscar-tests/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278811851,"owners_count":26050183,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-07T17:06:40.619Z","updated_at":"2025-10-07T17:06:48.469Z","avatar_url":"https://github.com/grycap.png","language":"RobotFramework","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 OSCAR Testing with the Robot Framework\n\n Welcome to the OSCAR Test Suite. This repository provides an automated testing suite built with the Robot Framework to validate and monitor the health and functionality of the OSCAR clusters.\n\n## 🚀 Getting Started\n\n### 🔧 Prerequisites\n\nBefore running the tests, ensure you have the following tools installed:\n\n- [Python 3.8+](https://www.python.org/)\n- [Robot Framework](https://robotframework.org/)\n- [oscar-cli](https://github.com/grycap/oscar-cli)\n- [oscar-python](https://github.com/grycap/oscar_python/)\n\nTo install the required dependencies:\n\n```\npip install -r requirements.txt\n```\n\n### 📦 Installing oscar-cli\n`oscar-cli` is a Go-based tool and must be installed separately.\n\nYou can install it by following the [documentation](https://docs.oscar.grycap.net/oscar-cli/#download).\n\n### 🧑‍💻 Setting Up the Configuration File\n\nThe test suite uses environment variables to store sensitive information such as  endpoints and credentials.\n\nCreate a `.env.yaml` file according to the template shown in `env-template.yaml`\n\nThe following information is required:\n\n  - `OSCAR_ENDPOINT`: The endpoint of the OSCAR cluster (e.g. https://mycluster.oscar.grycap.net) \n  - `OSCAR_METRICS`: The endpoint of the OSCAR metrics.\n  - `OSCAR_DASHBOARD`: The endpoint of the OSCAR UI (dashboard).\n  - `BASIC_USER:`: Base64-encoded information of the authentication for the 'oscar' user (echo -n \"oscar:password\"  | base64)\n  - `EGI_AAI_URL`: The base URL of the EGI AAI (Authentication and Authorisation Infrastructure) server.\n      - For the production server, use `https://aai.egi.eu`.\n      - For the demo server, use `https://aai-demo.egi.eu`.\n  - `REFRESH_TOKEN`: The OIDC token used to automate the execution of the test suite. In order to get a Refresh Token, head to the [Check-in Token Portal](https://aai.egi.eu/token/) or [Demo Check-in Token Portal](https://aai-demo.egi.eu/token/), click **Authorise** and then **Create Refresh Token** button to generate a new token.\n  - `EGI_VO`: The virtual organization used to test the OSCAR cluster.\n  - `FIRST_USER`: User ID\n  - `FIRST_USER_ID`: Get the first 10 characters of FIRST_USER (e.g. FIRST_USER: 1234567890987654321 -\u003e FIRST_USER_ID: 1234567890) \n  - `REFRESH_TOKEN_SECOND_USER`: The OIDC token of the second user used to automate the execution\n  - `SECOND_USER`: User ID of the second user\n  - `SECOND_USER_ID`: Get the first 10 characters of SECOND_USER\n\n\n\n### 🧪 Running Tests\n\nTo execute the test cases, simply run the following command:\n\nRun the tests:\n```\nrobot -V variables/.env.yaml -d robot_results/ tests/\n```\n\n- `.env.yaml`: Your YAML file containing the necessary environment variables.\n-  `robot_results`: The directory where the output results of the tests will be stored.\n-  `tests`: The directory containing the test cases.\n\n\nThis executes all the defined tests. You can also execute a single test suite with:\n\n```\nrobot -V variables/.env.yaml -d robot_results/ tests/api/service-lifecycle.robot\n```\n\n## 📊 Test Reports and Logs\n\nAfter running the tests, you’ll get detailed logs and reports in the:\n\n- Report: `report.html` – A high-level test summary\n- Log: `log.html` – Detailed execution log for debugging\n\n## 🐳 Running Tests with Docker\n\nYou can run the test suite inside a Docker container for better portability and reproducibility.\n\n### 🛠️ Build the Docker Image\n\nYou can either build your own image or use the prebuilt image from GitHub Container Registry (GHCR).\n\n**Option 1: Build the Docker image locally**\n\n```\ndocker build -t oscar-tests:latest .\n```\n\n**Option 2: Use the prebuilt image from GHCR**\n\nUse the [oscar-tests](https://github.com/orgs/grycap/packages/container/package/oscar-tests) image from GHCR.\n\n\nThese images contain all the necessary dependencies to run the tests (except `oscar-cli`, see note below).\n\n### ▶️ Run All Tests\nTo run all the test suites:\n\n```\ndocker run \\\n  -e ROBOT_OPTIONS=\"--variablefile variables/.env.yaml --pythonpath .\" \\\n  -v \"$PWD\":/opt/robotframework/tests:Z \\\n  --workdir /opt/robotframework/tests \\\n  ghcr.io/grycap/oscar-tests:latest\n```\n\u003e 💡 If you built the image locally, replace the image name with `oscar-tests:latest`.\n\n### 🧪 Run a Single Test Suite\nTo run a specific test suite:\n\n```\ndocker run \\\n  -e ROBOT_OPTIONS=\"--variablefile variables/.env.yaml --pythonpath .\" \\\n  -v \"$PWD\":/opt/robotframework/tests:Z \\\n  --workdir /opt/robotframework/tests \\\n  ghcr.io/grycap/oscar-tests:latest \\\n  robot tests/\u003cpath-to-suite\u003e\n```\nReplace `\u003cpath-to-suite\u003e` with the desired test file.\n\n\u003e ⚠️ Note: `oscar-cli` binary is not included in the Docker image.\n\u003e If you're running `oscar-cli.robot`, you must manually install it in the container before running the tests.\n\nYou can find more information about the docker options used in this image in the base image documentation [here](https://github.com/ppodgorsek/docker-robot-framework).\n\n## 📖 Documentation\n\n  - [Robot Framework User Guide](https://robotframework.org)\n\t\n\n## 🙌 Contributing\n\nFeel free to open issues, create pull requests, or improve the documentation.\n\n## 📜 License\n\nThis project is licensed under the Apache 2.0 License. See the LICENSE file for details.\n\n## 💬 Contact\n\nFor any questions or support, reach out via:\n  - GitHub Issues: Create a New Issue\n\nHappy testing! 🎉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrycap%2Foscar-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrycap%2Foscar-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrycap%2Foscar-tests/lists"}