How kiranmahanthesh/naukriprofileautomation works
Project type and purpose
• This is a test‐automation pipeline for updating a Naukri profile. It uses Cypress (with Cucumber BDD) for end‑to‑end testing and Jenkins for CI/CD. The pipeline can be triggered manually or via cron.
File structure
• Top‐level files:
• Jenkinsfile defines the CI steps.
• .github/workflows/cypress.yml shows GitHub Actions CI as an alternative.
• cypress.config.js configures Cypress.
• cypress/ directory:
• e2e/*.feature – Cucumber feature files (BDD).
• fixtures/ – test data (PDF, credentials).
• support/commands.js, step_definitions/ – custom commands and step definitions.
• package.json/package-lock.json show NodeJS dependencies.
README for additional insights
• CI pipeline steps: checkout → npm install → verify Cypress → run tests → capture artifacts → archive results.
• Uses Jenkins (or GitHub Actions) and supports secure credentials via GitHub Secrets or Jenkins Credentials Manager.
• Future plans include cloud execution and notifications.
a. Main components
1. Source Control: GitHub repository
2. CI/CD Server: Jenkins (or GitHub Actions)
3. Build & Test Agent: NodeJS environment running Cypress + Cucumber
4. Test Runner: Cypress binary + feature files + step definitions + fixtures
5. External System Under Test: Naukri web application
6. Artifact Store: Jenkins workspace or cloud storage (screenshots, videos)
7. Scheduler/Trigger: Manual trigger or cron job in Jenkins/GitHub Actions
8. Secrets Store: GitHub Secrets / Jenkins Credentials
b. Relationships & interactions
• Developer pushes code → triggers GitHub Action or Jenkins pipeline.
• CI server clones repo → provisions NodeJS agent → injects credentials.
• Agent installs dependencies (npm install).
• Agent starts Cypress tests (reads .feature files, step definitions).
• Cypress executes against Naukri UI over HTTP.
• On failures, Cypress captures screenshots/videos → archives to Jenkins.
• CI server publishes test report and artifacts.
• Scheduler (cron) can auto‐trigger this pipeline.
c. Architectural patterns & principles
• Pipeline-as-Code: Jenkinsfile / GitHub workflows.
• BDD: Cucumber feature files separate behavior spec from code.
• Separation of Concerns:
• CI orchestration (Jenkins)
• Test implementation (Cypress + Cucumber)
• Test data (fixtures)
• Environment configuration (cypress.config.js, secrets)
d. Key technologies/frameworks
• NodeJS: runtime for Cypress
• Cypress + Cucumber plugin: test automation framework
• Jenkins / GitHub Actions: CI/CD
• GitHub: source control & optionally CI trigger
• Cron: scheduling