generated from bcgov/vue-scaffold
-
Notifications
You must be signed in to change notification settings - Fork 2
Ccfri 5574,5818 : Validlogin, delink organization CMS #813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Nsinglaa
wants to merge
10
commits into
main
Choose a base branch
from
ccfri-5574-CMS-Selenium-Testing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d1b0764
29th aug
a827ff8
ccfri-5818-cms-delink-organization
Nsinglaa 8166af8
Remove old CCOFCRMTesting_Selenium; keep only CCOFCMS_Selenium
Nsinglaa a063694
chore: squash commits
Nsinglaa a0b4335
removed old reports
Nsinglaa af72d63
Restructure Selenium; add config.sample.properties; update .gitignore
Nsinglaa 92b7fb8
update pom.xml
Nsinglaa fef000c
Update .gitignore and remove IDE-specific files
Nsinglaa fcd0e03
Fix folder name case to lowercase selenium
Nsinglaa c6b203e
CCFRI 5574,5818,5880,5683 and addressed PR comments
Nsinglaa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,3 +40,4 @@ yarn-error.log* | |
|
||
# temp office files | ||
~$* | ||
/.metadata/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
<attribute name="optional" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
<attribute name="test" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
<attribute name="test" value="true"/> | ||
<attribute name="optional" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" path="src/main/resource"/> | ||
<classpathentry kind="src" path="src/main/java"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.testng.TESTNG_CONTAINER"/> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/target/ | ||
# Ignore properties file | ||
config.properties | ||
|
||
# Ignore Extent Reports folder | ||
/extent-reports/ | ||
|
||
# Ignore Logs folder | ||
/logs/ | ||
/test-output/ |
Empty file.
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>Selenium_CMS</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.m2e.core.maven2Builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
eclipse.preferences.version=1 | ||
encoding//src/test/java=UTF-8 | ||
encoding/<project>=UTF-8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 | ||
org.eclipse.jdt.core.compiler.compliance=17 | ||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | ||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore | ||
org.eclipse.jdt.core.compiler.release=enabled | ||
org.eclipse.jdt.core.compiler.source=17 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
activeProfiles= | ||
eclipse.preferences.version=1 | ||
resolveWorkspaceProjects=false | ||
version=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
userprojectsettings=false |
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
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 | ||
|
||
## 🚀 Setup Instructions | ||
|
||
1. **Clone the repository** | ||
|
||
git clone < repo - url > | ||
|
||
cd < project-folder > | ||
|
||
2. cp config.sample.properties config.properties # Mac/Linux | ||
copy config.sample.properties config.properties # Windows | ||
|
||
3. Open config.properties and update values for: | ||
|
||
username / password → your login credentials | ||
|
||
Any other settings as per your environment | ||
|
||
4. Run Tests | ||
|
||
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 . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
|
||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
######################### | ||
# Sample Config File | ||
# Copy this file as config.properties | ||
# and update values as per your local setup | ||
######################### | ||
|
||
qa_crm_url=https://mychildcareservicestest.crm3.dynamics.com/main.aspx?appid=80ab5cd2-70bd-4542-baff-9aa920090967&pagetype=dashboard&id=dd6fd3f1-1e2d-ed11-9db0-000d3af4f2d7&type=system&_canOverride=true | ||
|
||
uat_crm_url=https://mychildcareservicesuat.crm3.dynamics.com/main.aspx?appid=12eb8357-7190-481b-8a91-239b4bb12b2b&forceUCI=1&pagetype=entitylist&etn=account&viewid=5daf8291-112d-ed11-9db0-000d3af4f2d7&viewType=1039 | ||
|
||
crm_username= | ||
crm_password= | ||
|
||
browser=chrome |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
<?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> | ||
<!-- 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> |
16 changes: 16 additions & 0 deletions
16
test/Selenium/src/main/java/ExtentReport/ExtentManager.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package ExtentReport; | ||
|
||
import com.aventstack.extentreports.ExtentReports; | ||
import com.aventstack.extentreports.reporter.ExtentSparkReporter; | ||
|
||
public class ExtentManager { | ||
public static final ExtentReports extentReports = new ExtentReports(); | ||
public synchronized static ExtentReports createExtentReports() { | ||
ExtentSparkReporter reporter = new ExtentSparkReporter("./extent-reports/extent-report.html"); | ||
reporter.config().setReportName("Extent Report"); | ||
extentReports.attachReporter(reporter); | ||
extentReports.setSystemInfo("Project Name", "CCOF"); | ||
extentReports.setSystemInfo("Author", "QA"); | ||
return extentReports; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.