Skip to content
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

Bugfix/timestamp property files #45

Merged
merged 6 commits into from
Jan 27, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixed timestamp issue on every save of property files
  • Loading branch information
Ashish authored and Ashish committed Dec 22, 2024
commit 0bbbe18e7b86571be00edb02d077e98931ed17c8
25 changes: 20 additions & 5 deletions Datalib/src/main/java/com/ing/datalib/settings/PropUtils.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@

package com.ing.datalib.settings;

import com.ing.datalib.util.data.LinkedProperties;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Map;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
*
*
*
*/
public class PropUtils {

@@ -33,10 +35,23 @@ public static void save(Properties prop, String filename) {
if (!new File(filename).getParentFile().exists()) {
new File(filename).getParentFile().mkdirs();
}
try (FileOutputStream fout = new FileOutputStream(new File(filename))) {
prop.store(fout, null);
} catch (Exception ex) {
saveProperties(prop, filename);
}

private static void saveProperties(Properties prop, String filename) {
File file = new File(filename);
try (BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "ISO_8859_1"))) {
synchronized (prop) {
for (Map.Entry<Object, Object> e : prop.entrySet()) {
String key = (String) e.getKey();
String val = (String) e.getValue();
bw.write(key + "=" + val);
bw.newLine();
}
}
} catch (IOException ex) {
Logger.getLogger(PropUtils.class.getName()).log(Level.SEVERE, filename, ex);
}

}
}
Original file line number Diff line number Diff line change
@@ -5,9 +5,7 @@
import com.ing.datalib.settings.ProjectSettings;
import com.ing.datalib.settings.emulators.Emulator;
import com.ing.datalib.util.data.LinkedProperties;
import com.ing.engine.drivers.ChromeEmulators;
import com.ing.engine.drivers.PlaywrightDriverFactory;
import com.ing.ide.main.help.Help;
import com.ing.ide.main.mainui.AppMainFrame;
import com.ing.ide.main.utils.Utils;
import com.ing.ide.main.utils.table.XTable;
@@ -19,7 +17,6 @@
import java.awt.event.ItemEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.net.URI;
import java.util.Enumeration;
import java.util.List;
import java.util.Objects;

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
Run Information
========================
INGenious Playwright Studio engine : 2.0
java.runtime.name : OpenJDK Runtime Environment
java.version : 17.0.13
java.home : /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
os.name : Mac OS X
os.arch : aarch64
os.version : 14.7.1
file.encoding : UTF-8
========================
👉 Run Started on Sun Dec 22 20:49:36 CET 2024

[Scenario:Contact Us] [TestCase: User should be able to send a question on Sustainability] [Description: User should be able to send a question on Sustainability] [Browser: Chromium] [BrowserVersion: Default] [Platform: Mac OS X][ExistingBrowser: false]
[Scenario:Contact Us] [TestCase: User should be able to send a question on Innovation] [Description: User should be able to send a question on Innovation] [Browser: Chromium] [BrowserVersion: Default] [Platform: Mac OS X][ExistingBrowser: false]
----------------------------------------------------------
[2] TestCases selected for execution from [//Release1/Set1]
----------------------------------------------------------
testset : Set1

👉 Run Manager : true

👉 Continue Execution : true

👉 Running Iteration 1

🚀 Launching Chromium

👉 Running Iteration 1

🚀 Launching Chromium

🚀 Launching Local Driver

🚀 Launching Local Driver

Step:1 | Object: Browser | Action: Open | Input: @https://www.ing.com/web/show | Conditon: | @22-Dec-2024 20:49:40.040
Step:1 | Object: Browser | Action: Open | Input: @https://www.ing.com/web/show | Conditon: | @22-Dec-2024 20:49:40.040
[DONE] | Opened Url: https://www.ing.com/web/show 🟢

===================================================================================================

Step:2 | Object: Accept Cookies | Action: Click | Input: | Conditon: | @22-Dec-2024 20:49:41.041
[DONE] | Opened Url: https://www.ing.com/web/show 🟢

===================================================================================================

Step:2 | Object: Accept Cookies | Action: Click | Input: | Conditon: | @22-Dec-2024 20:49:41.041
[DONE] | Clicking on [Accept Cookies] 🟢

===================================================================================================

Step:3 | Object: [Contact Us] Button | Action: Click | Input: | Conditon: | @22-Dec-2024 20:49:41.041
Object being identified with [Role] = [Link;Contact Us],
[DONE] | Clicking on [Accept Cookies] 🟢

===================================================================================================

Step:3 | Object: [Contact Us] Button | Action: Click | Input: | Conditon: | @22-Dec-2024 20:49:41.041
Object being identified with [Role] = [Link;Contact Us],
[DONE] | Clicking on [[Contact Us] Button] 🟢

===================================================================================================

[DONE] | Clicking on [[Contact Us] Button] 🟢
Step:1 | Object: First name *(required) | Action: Click | Input: | Conditon: | @22-Dec-2024 20:49:42.042

===================================================================================================

Object being identified with [Label] = [First name *(required)],
Step:1 | Object: First name *(required) | Action: Click | Input: | Conditon: | @22-Dec-2024 20:49:42.042
Object being identified with [Label] = [First name *(required)],
[DONE] | Clicking on [First name *(required)] 🟢

===================================================================================================

Step:2 | Object: First name *(required) | Action: Fill | Input: @John | Conditon: | @22-Dec-2024 20:49:42.042
Object being identified with [Label] = [First name *(required)],
[DONE] | Clicking on [First name *(required)] 🟢
[DONE] | Entered Text 'John' on '[First name *(required)]' 🟢

===================================================================================================


===================================================================================================

Step:2 | Object: First name *(required) | Action: Fill | Input: @John | Conditon: | @22-Dec-2024 20:49:42.042
Step:3 | Object: Last name *(required) | Action: Click | Input: | Conditon: | @22-Dec-2024 20:49:42.042
Object being identified with [Label] = [First name *(required)],
Object being identified with [Label] = [Last name *(required)],
[DONE] | Entered Text 'John' on '[First name *(required)]' 🟢

===================================================================================================

Step:3 | Object: Last name *(required) | Action: Click | Input: | Conditon: | @22-Dec-2024 20:49:42.042
Object being identified with [Label] = [Last name *(required)],
[DONE] | Clicking on [Last name *(required)] 🟢

===================================================================================================

Step:4 | Object: Last name *(required) | Action: Fill | Input: @Doe | Conditon: | @22-Dec-2024 20:49:42.042
Object being identified with [Label] = [Last name *(required)],
[DONE] | Entered Text 'Doe' on '[Last name *(required)]' 🟢

===================================================================================================

[DONE] | Clicking on [Last name *(required)] 🟢
Step:5 | Object: Email address *(required) | Action: Click | Input: | Conditon: | @22-Dec-2024 20:49:42.042

===================================================================================================

Object being identified with [Label] = [Email address *(required)],
Step:4 | Object: Last name *(required) | Action: Fill | Input: @Doe | Conditon: | @22-Dec-2024 20:49:42.042
Object being identified with [Label] = [Last name *(required)],
[DONE] | Entered Text 'Doe' on '[Last name *(required)]' 🟢

===================================================================================================

Step:5 | Object: Email address *(required) | Action: Click | Input: | Conditon: | @22-Dec-2024 20:49:42.042
Object being identified with [Label] = [Email address *(required)],
[DONE] | Clicking on [Email address *(required)] 🟢

===================================================================================================

Step:6 | Object: Email address *(required) | Action: Fill | Input: @John.Doe@email.com | Conditon: | @22-Dec-2024 20:49:42.042
Object being identified with [Label] = [Email address *(required)],
[DONE] | Entered Text 'John.Doe@email.com' on '[Email address *(required)]' 🟢

===================================================================================================

Step:7 | Object: Country *(required) | Action: SelectSingleByText | Input: @Austria | Conditon: | @22-Dec-2024 20:49:42.042
[DONE] | Clicking on [Email address *(required)] 🟢
Object being identified with [Label] = [Country *(required)],

===================================================================================================

Step:6 | Object: Email address *(required) | Action: Fill | Input: @John.Doe@email.com | Conditon: | @22-Dec-2024 20:49:42.042
Object being identified with [Label] = [Email address *(required)],
[DONE] | Item 'Austria' is selected from list [Country *(required)] 🟢

===================================================================================================

[DONE] | Entered Text 'John.Doe@email.com' on '[Email address *(required)]' 🟢

===================================================================================================

Step:7 | Object: Country *(required) | Action: SelectSingleByText | Input: @Austria | Conditon: | @22-Dec-2024 20:49:42.042
Object being identified with [Label] = [Country *(required)],
[DONE] | Item 'Austria' is selected from list [Country *(required)] 🟢

===================================================================================================

Step:2 | Object: Clearly describe your | Action: Click | Input: | Conditon: | @22-Dec-2024 20:49:42.042
Step:2 | Object: Clearly describe your | Action: Click | Input: | Conditon: | @22-Dec-2024 20:49:42.042
Object being identified with [Label] = [Clearly describe your],
Object being identified with [Label] = [Clearly describe your],
[DONE] | Clicking on [Clearly describe your] 🟢
[DONE] | Clicking on [Clearly describe your] 🟢

===================================================================================================


===================================================================================================

Step:3 | Object: Clearly describe your | Action: Fill | Input: TestData:Description | Conditon: | @22-Dec-2024 20:49:42.042
Step:3 | Object: Clearly describe your | Action: Fill | Input: TestData:Description | Conditon: | @22-Dec-2024 20:49:42.042
Object being identified with [Label] = [Clearly describe your],
Object being identified with [Label] = [Clearly describe your],
[DONE] | Entered Text 'What are ING's policies for a greener earth' on '[Clearly describe your]' 🟢

===================================================================================================

[DONE] | Entered Text 'What are ING's innovation policies' on '[Clearly describe your]' 🟢
Step:4 | Object: Send | Action: Click | Input: | Conditon: | @22-Dec-2024 20:49:42.042

===================================================================================================

Object being identified with [Role] = [BUTTON;Send],
Step:4 | Object: Send | Action: Click | Input: | Conditon: | @22-Dec-2024 20:49:42.042
Object being identified with [Role] = [BUTTON;Send],
[DONE] | Clicking on [Send] 🟢

===================================================================================================

Step:1 | Object: Browser | Action: TakePageScreenshot | Input: | Conditon: | @22-Dec-2024 20:49:42.042
[DONE] | Clicking on [Send] 🟢
[PASS] | Screenshot is taken ✅

===================================================================================================


===================================================================================================

Step:1 | Object: Browser | Action: TakePageScreenshot | Input: | Conditon: | @22-Dec-2024 20:49:42.042
[PASS] | Screenshot is taken ✅

===================================================================================================





----------------------------------------------------------------------------
----------------------------------------------------------------------------
| Playwright instance with [Chromium] has been closed for Iteration : 1 |
----------------------------------------------------------------------------

| Playwright instance with [Chromium] has been closed for Iteration : 1 |
----------------------------------------------------------------------------


---------------------------------------------------
Testcase Name : Contact Us:User should be able to send a question on Sustainability
Executed Steps : 14
Passed Steps : 14
Failed Steps : 0
Time Taken : 00:00:05
-----------------------------------------------------


---------------------------------------------------
Testcase Name : Contact Us:User should be able to send a question on Innovation
Executed Steps : 14
Passed Steps : 14
Failed Steps : 0
Time Taken : 00:00:05
-----------------------------------------------------

Run Finished on Sun Dec 22 20:49:43 CET 2024
-----------------------------------------------------
ExecutionDate : 22-Dec-2024 20-49-36
Executed TestCases : 2
Passed TestCases : 2
Failed TestCases : 0
Time Taken : 00:00:06
ReportPath : file:////Users/la56qs/MyDevelopmentWork/INGeniousOpensource/SourceCode/INGenious2.0/INGenious/Resources/Projects/ING-Public-Web/Results/TestExecution/Release1/Set1/22-Dec-2024 20-49-36/summary.html
-----------------------------------------------------
Loading