{"id":25841296,"url":"https://github.com/daniel-grounin/cloudstoragecli-testing","last_synced_at":"2026-05-14T09:33:24.153Z","repository":{"id":279626506,"uuid":"939013231","full_name":"Daniel-Grounin/CloudStorageCLI-Testing","owner":"Daniel-Grounin","description":"Automated testing framework for Google Cloud Storage CLI commands using TestNG \u0026 Allure Reporting. Ensures smooth operations for bucket creation, file uploads, listing files, and signed URLs. 🚀","archived":false,"fork":false,"pushed_at":"2025-02-26T14:27:32.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-26T15:33:27.188Z","etag":null,"topics":["allure-report","automation","gcloud","maven","testing","testng"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Daniel-Grounin.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-02-25T21:14:07.000Z","updated_at":"2025-02-26T14:27:35.000Z","dependencies_parsed_at":"2025-02-26T15:35:09.793Z","dependency_job_id":"4766e840-901b-433d-9e1b-a45b91172700","html_url":"https://github.com/Daniel-Grounin/CloudStorageCLI-Testing","commit_stats":null,"previous_names":["daniel-grounin/cloudstoragecli-testing"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel-Grounin%2FCloudStorageCLI-Testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel-Grounin%2FCloudStorageCLI-Testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel-Grounin%2FCloudStorageCLI-Testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel-Grounin%2FCloudStorageCLI-Testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Daniel-Grounin","download_url":"https://codeload.github.com/Daniel-Grounin/CloudStorageCLI-Testing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241319563,"owners_count":19943554,"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","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":["allure-report","automation","gcloud","maven","testing","testng"],"created_at":"2025-03-01T05:23:19.293Z","updated_at":"2026-05-14T09:33:24.146Z","avatar_url":"https://github.com/Daniel-Grounin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📌 Project Overview\n\nThis project automates and tests **Google Cloud Storage CLI** commands using **TestNG**, **Allure** for reporting, and **Playwright** for signed URL validation.\n\n---\n\n# Running the Project with Docker\n\nThis section provides step-by-step instructions on how to build and run the project using Docker.\n\n## Steps to Run the Docker Container\n\n1. **Build the Docker Image:**\n   ```sh\n   docker build -t gcloud-tests .\n   ```\n\n2. **Run the Docker Container:**\n   ```sh\n   docker run -it --rm gcloud-tests\n   ```\n\n   This command will start the container and prompt you for authentication.\n\n3. **Authenticate with Google Cloud:**\n   - When you run the container, you will see a terminal output similar to this:\n     \n     ![image](https://github.com/user-attachments/assets/33dbf978-a007-4a9e-8350-e7aa7cfc504c)\n\n   \n   - Copy and paste the provided URL into your browser to authenticate your account.\n   \n   - Enter the verification code back into the terminal.\n\n4. **Verify that the Project and Bucket are Created:**\n   - After authentication, the setup script will create the necessary Google Cloud project and storage bucket.\n   - You can verify this by running:\n     ```sh\n     gcloud projects list\n     gcloud storage buckets list\n     ```\n\n5. **Expected Output:**\n   - After a successful setup, you should see output confirming the creation of the project and bucket\n     \n\nNow your Google Cloud project and bucket are ready for testing!\n\n\n---\n\n\n## 📂 Features\n\n✅ **Automated tests for Google Cloud Storage CLI commands:**\n- Create a bucket\n- Upload a file\n- List files in a bucket\n- Generate a signed URL\n\n🔄 **Modular test framework** for easy expansion\n\n📜 **Allure Reporting** for clear test execution insights\n\n🏗 **Maven-based project** for easy build \u0026 dependency management\n\n---\n\n## 🚀 Getting Started\n\n### 1️⃣ Prerequisites\nMake sure you have the following installed:\n- **Java 21+** ✅\n- **Maven** ✅\n- **Google Cloud SDK** ✅ *(Ensure gcloud CLI is authenticated and configured)*\n- **Allure CLI** ✅ *(For test reporting)*\n\n---\n\n### 2️⃣ Clone the Repository\n```sh\ngit clone https://github.com/yourusername/CloudStorageCLI-Testing.git\ncd CloudStorageCLI-Testing\n```\n\n---\n\n### 3️⃣ Configure Project Settings\nEdit `ProjectConfig.java` to match your GCP setup:\n```java\npublic class ProjectConfig {\n    public static final String BUCKET_NAME = \"your-bucket-name\";\n    public static final String TEST_FILE_NAME = \"test-file.txt\";\n    public static final String G_CLOUD_PATH = \"\\\"C:\\\\Program Files (x86)\\\\Google\\\\Cloud SDK\\\\google-cloud-sdk\\\\bin\\\\gcloud.cmd\\\"\";\n}\n```\n\n---\n\n### 4️⃣ Run Tests\nExecute tests using Maven:\n```sh\nmvn clean test\n```\n\n---\n\n### 5️⃣ Generate Allure Report\nAfter running the tests, generate the Allure report:\n```sh\nallure serve target/allure-results\n```\n\n---\n\n## 📝 Test Cases\n\n| Test Name              | Description                                  |\n|------------------------|----------------------------------------------|\n| **testCreateBucket**   | Checks if the bucket exists, creates if not |\n| **testUploadFile**     | Uploads a test file to the bucket           |\n| **testListFiles**      | Verifies the uploaded file exists in bucket |\n| **testGenerateSignedUrl** | Generates a signed URL for the uploaded file |\n\n### 🔹 Associated gcloud Commands\n\n| Operation | gcloud Command |\n|-----------|----------------|\n| **Create Bucket** | `gcloud storage buckets create gs://\u003cBUCKET_NAME\u003e --location=me-west1` |\n| **Upload File** | `gcloud storage cp test-file.txt gs://\u003cBUCKET_NAME\u003e/` |\n| **List Files** | `gcloud storage ls gs://\u003cBUCKET_NAME\u003e/` |\n| **Generate Signed URL** | `gcloud storage sign-url --duration=10m gs://\u003cBUCKET_NAME\u003e/test-file.txt` |\n\n---\n\n## 📊 Reporting System\nThe project integrates **Allure Reports** for test execution insights. Reports include:\n- **Test results** (pass/fail)\n- **Execution time breakdown**\n- **Detailed logs per test**\n\n---\n\n## 📂 Project Structure\n\n```\nCloudStorageCLI-Testing/\n│── .allure/                 # Allure reporting files\n│── .idea/                   # IntelliJ project settings\n│── allure-results/          # Allure test results\n│── src/\n│   ├── main/java/com/cloudstorage/\n│   │   ├── config/          # Configuration class\n│   │   │   ├── ProjectConfig.java\n│   │   ├── utils/           # Utility classes\n│   │   │   ├── CommandRunner.java\n│   │   │   ├── PlaywrightManager.java\n│   ├── test/java/com/cloudstorage/\n│   │    │   ├── tests/\n│   │    │   │   ├── GCloudStorageTests.java    # Tests for gcloud CLI\n│   │    │   │   ├── PlaywrightSignedURLTest.java    # Playwright tests for signed URL security\n│   │    │   ├── resources/\n│   │    │   │   ├──testng.xml    # TestNG configuration\n│── target/                  # Compiled test results\n│── .gitignore               # Git ignore file\n│── phishing_check.png        # Screenshot for Playwright test\n│── pom.xml                  # Maven dependencies\n│── readme.md                # Project documentation\n│── test-file.txt            # Test file for uploads\n│── \n```\n\n---\n\n## 🖨 ScreenShots of Allure Report\n\n![Screenshot_1](https://github.com/user-attachments/assets/efc1ceda-9593-441c-aa3c-2e0cf1a7b8d5)\n![Screenshot_2](https://github.com/user-attachments/assets/adaf96ca-2e97-48f9-b5ae-b2aecc34b757)\n\n---\n\n## 📜 License\nThis project is for educational and testing purposes. Modify and use it as needed!\n\n1. docker build -t gcloud-tests .\n2. docker run -it --rm gcloud-tests\n3. gcloud auth login\n4. ENTER THE VERIFICATION CODE\n5. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel-grounin%2Fcloudstoragecli-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniel-grounin%2Fcloudstoragecli-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel-grounin%2Fcloudstoragecli-testing/lists"}