This project is an End-to-End (E2E) Test Automation Framework designed to simulate a real user journey on LinkedIn. It automates critical workflows such as logging in, searching for recruiters, composing personalized messages, and logging out.
The framework goes beyond isolated unit tests by validating the entire workflow across multiple pages and components. It integrates with Zephyr for Jira for test case management and is built to run both locally and in CI/CD pipelines (GitHub Actions, Jenkins, Docker).
- E2E Browser Automation: Uses Playwright for reliable and fast browser interactions.
- Page Object Model (POM): Implements POM design patterns for maintainable and scalable code.
- Data-Driven Testing: Reads recruiter names from Excel files (
.xlsx) to dynamically generate test cases. - TypeScript: Written in TypeScript for strong typing and better developer tooling.
- Environment Management: Uses
.envfiles for secure handling of credentials and configuration. - Robust Reporting: Integrates Allure Reports for visual execution results and Zephyr for Jira test management.
- Email Notifications: Automatically emails execution logs and reports upon test completion.
- CI/CD Ready: Configured for Docker and Jenkins integration.
- Playwright: E2E testing framework.
- TypeScript: Programming language.
- Node.js: Runtime environment.
- ExcelJS / XLSX: For reading Excel data.
- Dotenv: Environment variable management.
- Nodemailer: For sending email reports.
- Allure: Reporting tool.
├── data/
│ └── recruiterList.xlsx # Data file containing recruiter names
├── e2e/
│ └── example.spec.ts # Sample Playwright test
├── tests/
│ ├── pages/ # Page Object Models and Utilities
│ │ ├── basePage.ts # Base class for all pages
│ │ ├── loginPage.ts # Login page interactions
│ │ ├── linkedInSearchPage.ts # Search functionality
│ │ ├── composeMessage.ts # Message composition logic
│ │ ├── logoutPage.ts # Logout interactions
│ │ ├── readRecruiterNames.ts # Excel reading utility
│ │ ├── logAndReport.ts # Email reporting utility
│ │ ├── hooks.ts # Test hooks (setup/teardown)
│ │ └── globalTearDown.ts # Global cleanup scripts
│ ├── login.spec.ts # Login test suite
│ ├── userSendsMessage.spec.ts # Main E2E workflow test
│ └── seed.spec.ts # Data seeding placeholder
├── playwright.config.ts # Playwright configuration
├── package.json # Project dependencies and scripts
└── README.md # Project documentation
git clone https://github.com/sameermanzur/Linkedin-Automation-Testing-Project.git
cd Linkedin-Automation-Testing-Projectnpm installCreate a .env file in the root directory and add the following variables:
BASE_URL=https://www.linkedin.com
LINKEDIN_USERNAME=your_email@example.com
LINKEDIN_PASSWORD=your_password
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_REFRESH_TOKEN=your_google_refresh_token
GOOGLE_USER_EMAIL=your_email_for_sending_reports
REPORT_RECIPIENT=recipient_email@example.com
ZEPHYR_TOKEN=your_zephyr_api_keyEnsure data/recruiterList.xlsx exists and contains a list of names. The file should have headers like First Name, Last Name, or Name.
npx playwright testnpx playwright test tests/userSendsMessage.spec.tsnpx playwright test --headednpx allure generate ./allure-results --clean
npx allure open- BasePage: Contains common methods like
b_navigateTo,b_clickElement, andb_fillField. - LoginPage: Encapsulates login logic (
enterUserName,enterPassword,login). - LinkedInSearchPage: Handles navigating to the feed and searching for recruiters.
- ComposeMessagePage: Manages opening message dialogs, generating personalized text, and sending messages.
- LogoutPage: Handles the logout process to ensure a clean state.
Special thanks to Swaroop Landge for his continuous support and mentorship in QA Automation.
This project is licensed under the ISC License.