Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
de88598
Create App.class
Ramesh-Gt966 Sep 27, 2025
0a997ca
Create AppTest.class
Ramesh-Gt966 Sep 27, 2025
94a9c6e
Create jenkinsfile
Ramesh-Gt966 Sep 27, 2025
6fa01d9
Update App.class
Ramesh-Gt966 Sep 27, 2025
b6c9943
Create createdFiles.lst
Ramesh-Gt966 Sep 27, 2025
9decd0a
Create createdFiles.lst
Ramesh-Gt966 Sep 27, 2025
737b96f
Create inputFiles.lst
Ramesh-Gt966 Sep 27, 2025
3c80eb3
Create inputFiles.lst
Ramesh-Gt966 Sep 27, 2025
4182341
Create com.example.AppTest.txt
Ramesh-Gt966 Sep 27, 2025
74d215f
Create TEST-com.example.AppTest.xml
Ramesh-Gt966 Sep 27, 2025
91593a7
Update AppTest.class
Ramesh-Gt966 Sep 27, 2025
34fa104
Update jenkinsfile
Ramesh-Gt966 Sep 27, 2025
145a687
Delete jenkinsfile
Ramesh-Gt966 Sep 27, 2025
7c55e58
Create jenkinsfile
Ramesh-Gt966 Sep 27, 2025
60d47d3
Create jenkinsfile
Ramesh-Gt966 Sep 27, 2025
f08f002
Create 2025-09-28T02-15-05_649-jvmRun1-commands.bin
Ramesh-Gt966 Sep 27, 2025
ae23685
Create 2025-09-28T02-15-05_649-jvmRun1.dump
Ramesh-Gt966 Sep 27, 2025
990ac9d
Update com.example.AppTest.txt
Ramesh-Gt966 Sep 27, 2025
c712a9b
Update TEST-com.example.AppTest.xml
Ramesh-Gt966 Sep 27, 2025
80cb489
Create jenkinsfile
Ramesh-Gt966 Sep 27, 2025
c75d9b1
Delete jenkinsfile
Ramesh-Gt966 Sep 27, 2025
3ee07b3
Create ant.yml
Ramesh-Gt966 Sep 27, 2025
3988507
Update App.class
Ramesh-Gt966 Sep 27, 2025
bb2b6d1
Delete jenkinsfile
Ramesh-Gt966 Sep 27, 2025
6276b21
Update AppTest.class
Ramesh-Gt966 Sep 27, 2025
1fb442e
Merge branch 'main' of https://github.com/Ramesh-Gt966/java-code-samp…
Ramesh-Gt966 Sep 27, 2025
8650751
Update jenkinsfile
Ramesh-Gt966 Sep 27, 2025
463d145
Update jenkinsfile
Ramesh-Gt966 Sep 27, 2025
c8d4005
Update jenkinsfile
Ramesh-Gt966 Sep 27, 2025
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
25 changes: 25 additions & 0 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflow will build a Java project with Ant
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant

name: Java CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Build with Ant
run: ant -noinput -buildfile build.xml
31 changes: 31 additions & 0 deletions jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
pipeline {
agent any

stages {
stage('Checkout') {
steps {
// Jenkins automatically checks out the repo, but this ensures clarity
git url: 'git url: 'https://github.com/Ramesh-Gt966/java-code-sample-with-unit-test-cases.git', branch: 'main', branch: 'main'
}
}

stage('Build & Test') {
steps {
// Use 'bat' if Jenkins is running on Windows
sh 'mvn clean test'
}
}
}

post {
always {
echo 'Pipeline execution completed.'
}
success {
echo 'Build and tests succeeded!'
}
failure {
echo 'Build or tests failed. Check console output for details.'
}
}
}
Binary file added target/classes/com/example/App.class
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
C:\Users\Lenovo\Documents\GitHub\java-code-sample-with-unit-test-cases\src\main\java\com\example\App.java
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
C:\Users\Lenovo\Documents\GitHub\java-code-sample-with-unit-test-cases\src\test\java\com\example\AppTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
:maven-surefire-command::noop::maven-surefire-command::bye-ack:
3 changes: 3 additions & 0 deletions target/surefire-reports/2025-09-28T02-15-05_649-jvmRun1.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Created at 2025-09-28T02:15:06.396
Found Maven process ID 4024 for the fork 1.

71 changes: 71 additions & 0 deletions target/surefire-reports/TEST-com.example.AppTest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd" version="3.0" name="com.example.AppTest" time="0.088" tests="4" errors="0" skipped="0" failures="0">
<properties>
<property name="jpda.address" value="54772"/>
<property name="java.specification.version" value="21"/>
<property name="sun.cpu.isalist" value="amd64"/>
<property name="sun.jnu.encoding" value="Cp1252"/>
<property name="java.class.path" value="C:\Users\Lenovo\Documents\GitHub\java-code-sample-with-unit-test-cases\target\test-classes;C:\Users\Lenovo\Documents\GitHub\java-code-sample-with-unit-test-cases\target\classes;C:\Users\Lenovo\.m2\repository\junit\junit\4.13.2\junit-4.13.2.jar;C:\Users\Lenovo\.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;"/>
<property name="java.vm.vendor" value="Oracle Corporation"/>
<property name="sun.arch.data.model" value="64"/>
<property name="user.variant" value=""/>
<property name="java.vendor.url" value="https://java.oracle.com/"/>
<property name="user.timezone" value="Asia/Calcutta"/>
<property name="forkMode" value="once"/>
<property name="os.name" value="Windows 11"/>
<property name="java.vm.specification.version" value="21"/>
<property name="user.country" value="IN"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="sun.boot.library.path" value="C:\Program Files\Java\jdk-21\bin"/>
<property name="sun.java.command" value="C:\Users\Lenovo\AppData\Local\Temp\surefire13261633628572257905\surefirebooter-20250928021505809_3.jar C:\Users\Lenovo\AppData\Local\Temp\surefire13261633628572257905 2025-09-28T02-15-05_649-jvmRun1 surefire-20250928021505809_1tmp surefire_0-20250928021505809_2tmp"/>
<property name="jdk.debug" value="release"/>
<property name="test" value="com.example.AppTest"/>
<property name="surefire.test.class.path" value="C:\Users\Lenovo\Documents\GitHub\java-code-sample-with-unit-test-cases\target\test-classes;C:\Users\Lenovo\Documents\GitHub\java-code-sample-with-unit-test-cases\target\classes;C:\Users\Lenovo\.m2\repository\junit\junit\4.13.2\junit-4.13.2.jar;C:\Users\Lenovo\.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.home" value="C:\Users\Lenovo"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2024-07-16"/>
<property name="java.home" value="C:\Program Files\Java\jdk-21"/>
<property name="file.separator" value="\"/>
<property name="basedir" value="C:\Users\Lenovo\Documents\GitHub\java-code-sample-with-unit-test-cases"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="surefire.real.class.path" value="C:\Users\Lenovo\AppData\Local\Temp\surefire13261633628572257905\surefirebooter-20250928021505809_3.jar"/>
<property name="user.script" value=""/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="java.runtime.version" value="21.0.4+8-LTS-274"/>
<property name="user.name" value="Lenovo"/>
<property name="stdout.encoding" value="Cp1252"/>
<property name="path.separator" value=";"/>
<property name="os.version" value="10.0"/>
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
<property name="jpda.listen" value="true"/>
<property name="maven.ext.class.path" value="C:\Users\Lenovo\.vscode\extensions\oracle.oracle-java-24.1.0\nbcode\java\maven-nblib\netbeans-eventspy.jar"/>
<property name="localRepository" value="C:\Users\Lenovo\.m2\repository"/>
<property name="java.vendor.url.bug" value="https://bugreport.java.com/bugreport/"/>
<property name="java.io.tmpdir" value="C:\Users\Lenovo\AppData\Local\Temp\"/>
<property name="java.version" value="21.0.4"/>
<property name="user.dir" value="C:\Users\Lenovo\Documents\GitHub\java-code-sample-with-unit-test-cases"/>
<property name="os.arch" value="amd64"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="sun.os.patch.level" value=""/>
<property name="native.encoding" value="Cp1252"/>
<property name="java.library.path" value="C:\Program Files\Java\jdk-21\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\TRICENTIS\Tosca Testsuite\ToscaCommander;;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\nodejs\;C:\Program Files\GitHubDesktop\app-3.5.2\resources\app\git\cmd;C:\Program Files\Apache\mvn\bin;C:\Users\Lenovo\AppData\Local\Programs\Eclipse Adoptium\jdk-21.0.8.9-hotspot\bin;C:\Users\Lenovo\AppData\Local\Microsoft\WindowsApps;C:\Users\Lenovo\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Lenovo\AppData\Local\GitHubDesktop\bin;C:\Users\Lenovo\AppData\Roaming\npm;."/>
<property name="java.vm.info" value="mixed mode, sharing"/>
<property name="stderr.encoding" value="Cp1252"/>
<property name="java.vendor" value="Oracle Corporation"/>
<property name="java.vm.version" value="21.0.4+8-LTS-274"/>
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
<property name="java.class.version" value="65.0"/>
<property name="maven.surefire.debug" value="-agentlib:jdwp=transport=dt_socket,server=n,address=54772"/>
</properties>
<testcase name="testAdd" classname="com.example.AppTest" time="0.005"/>
<testcase name="testSubtract" classname="com.example.AppTest" time="0.0"/>
<testcase name="testIsEven" classname="com.example.AppTest" time="0.0"/>
<testcase name="testGetGreeting" classname="com.example.AppTest" time="0.0"/>
</testsuite>
4 changes: 4 additions & 0 deletions target/surefire-reports/com.example.AppTest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-------------------------------------------------------------------------------
Test set: com.example.AppTest
-------------------------------------------------------------------------------
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.088 s -- in com.example.AppTest
Binary file added target/test-classes/com/example/AppTest.class
Binary file not shown.