Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ yarn-error.log*

# temp office files
~$*
/.metadata/
15 changes: 15 additions & 0 deletions test/selenium/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/target/
# Ignore properties file
config.properties

# Ignore Extent Reports folder
/extent-reports/

# Ignore Logs folder
/logs/
/test-output/

# Ignore IDE specific files
**/.classpath
**/.project
**/.settings/
Empty file added test/selenium/.mvn/jvm.config
Empty file.
Empty file added test/selenium/.mvn/maven.config
Empty file.
Binary file added test/selenium/Drivers/IEDriverServer.exe
Binary file not shown.
Binary file added test/selenium/Drivers/chromedriver.exe
Binary file not shown.
57 changes: 57 additions & 0 deletions test/selenium/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Selenium Testing

Instructions on how to install and run selenium tests

Environment Setup - Eclipse IDE

`Step 1` Download JDK 21

`Step 2` Download the Eclipse IDE

`Step 3` On the Eclipse marketplace, install the TestNG for Eclipse plugin

# Selenium Test Automation Project

This project contains automated test scripts built using Selenium WebDriver, Java, and TestNG.
It follows the Page Object Model (POM) design pattern and integrates with Extent Reports for detailed test reporting.

## Setup Instructions

1. **Clone the repository**

git clone https://github.com/bcgov/EDUC-CCOF.git

cd EDUC-CCOF

2. copy config.sample.properties config.properties

3. Open config.properties and update values for:

qa_crm_url=

uat_crm_url=

crm_username=

crm_password=

browser=

4. Run Tests

Add any test class tag names to testNG.xml that you would like to run

From Eclipse: Right-click your TestNG runner → Run As → TestNG Suite

5. Reports & Logs

Extent Reports: /extent-reports/

Logs: /logs/

TestNG default: /test-output/

Note: config.properties, logs, extent-reports and test-output are ignored from Git.
Each developer must maintain their own local config.properties file.
Run tests from testng in order to generate reports
Delete application test will work if we have any organization linked .
16 changes: 16 additions & 0 deletions test/selenium/TestNG.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" >
<suite name="TestNgSuite">
<listeners>
<listener class-name="ExtentReport.TestListener"/>
</listeners>
<test name="Test1" preserve-order="true">
<classes>
<class name="ca.bc.gov.educ.ccof.selenium.TestCases.ValidLogin" />
<class name="ca.bc.gov.educ.ccof.selenium.TestCases.DeleteApplication" />
</classes>
</test>
</suite>



13 changes: 13 additions & 0 deletions test/selenium/config.sample.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#########################
# Sample Config File
# Copy this file as config.properties
# and update values as per your local setup
#########################

qa_crm_url=
uat_crm_url=

crm_username=
crm_password=

browser=chrome
14 changes: 14 additions & 0 deletions test/selenium/data/CCFRIRec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"statuses": {
"CCFRIRecOne": "Ineligible",
"CCFRIRecTwo": "Opt-Out",
"CCFRIRecThree": "Stage 1 (NRC)",
"CCFRIRecFour": "Stage 2 - Fee Increase Limit",
"CCFRIRecFive": "Stage 3",
"CCFRIRecSix": "Stage 3 (AFC)",
"CCFRIRecSeven": "Not Approved",
"CCFRIRecEight": "Not Approved (Closure)",
"CCFRIRecNine": "Not Approved (Fee Schedule)",
"CCFRIRecTen": "Pending"
}
}
191 changes: 191 additions & 0 deletions test/selenium/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.selenium</groupId>
<artifactId>selenium-automation</artifactId>
<version>0.0.1-SNAPSHOT</version>

<name>Selenium Automation Framework</name>
<url>http://www.example.com</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>17</maven.compiler.release>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.11.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>

<!-- Optionally: parameterized tests support -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.34.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.testng/testng -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.11.0</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.4.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.4.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.aventstack/extentreports -->
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>5.1.2</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>

<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>5.5.2</version>
</dependency>

<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>6.1.0</version>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.28</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.9</version>
</dependency>

<!-- ExtentReports -->
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>5.0.9</version>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.20.0</version>
</dependency>
<dependency>

<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.20.0</version>
</dependency>



</dependencies>

<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.12.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.6.1</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Loading