Skip to content

Commit 15bfbac

Browse files
committed
java sample test done
1 parent edbd270 commit 15bfbac

File tree

2 files changed

+23
-24
lines changed

2 files changed

+23
-24
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ This utility automates the entire first-mile experience — from credential inpu
1616
| 🪵 Logging for Debugging | Saves all raw logs under `~/.browserstack/bstack_onboarding.log` for support and debugging purposes. |
1717
| 🖥️ (Planned) UI Framework Picker | Allows customers to select their preferred test framework via an interactive UI. |
1818

19-
## How to Use
19+
## How to Use?
2020

2121
You can either run the script directly from the web or clone the repository and run it locally.
2222

2323
### Clone and Run Locally
2424

2525
1. Clone the repository:
2626
```bash
27-
git clone https://github.com/http-heading/browserstack-now.git
27+
git clone https://github.com/BrowserStackCE/browserstack-now.git
2828
```
2929
2. Navigate to the directory:
3030
```bash
@@ -60,4 +60,21 @@ To run the onboarding utility on Windows without cloning, execute the following
6060
```powershell
6161
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/http-heading/browserstack-now/main/windows.ps1'))
6262
```
63+
64+
## Identifying and sharing the log files
65+
66+
The NOW framework creates the log files in this folder. To seek assistance from the BrowserStack team after running this Github repository, please share a zip of the logs with the BrowserStack team in toucn with you.
67+
68+
### NOW Framework Logs
69+
70+
#### macOS / Linux
71+
```
72+
$HOME/.browserstack/NOW/logs
6373
```
74+
75+
#### Windows
76+
```
77+
$HOME/.browserstack/NOW/logs
78+
```
79+
80+

mac.sh

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ is_domain_private() {
624624
domain=${CX_TEST_URL#*://} # remove protocol
625625
domain=${domain%%/*} # remove everything after first "/"
626626
log_msg_to "Website domain: $domain"
627-
export NOW_WEB_DOMAIN="$domain"
627+
export NOW_WEB_DOMAIN="$CX_TEST_URL"
628628

629629
# Resolve domain using Cloudflare DNS
630630
IP_ADDRESS=$(dig +short "$domain" @1.1.1.1 | head -n1)
@@ -650,14 +650,11 @@ setup_web_java() {
650650
TARGET_DIR="$WORKSPACE_DIR/$PROJECT_FOLDER/$REPO"
651651

652652
mkdir -p "$WORKSPACE_DIR/$PROJECT_FOLDER"
653-
653+
rm -rf $TARGET_DIR
654654
# === 1️⃣ Clone Repo ===
655-
if [ ! -d "$TARGET_DIR" ]; then
656655
log_msg_to "📦 Cloning repo $REPO into $TARGET_DIR" "$GLOBAL" "$WEB_LOG_FILE"
657656
git clone https://github.com/browserstackCE/now-testng-browserstack.git "$TARGET_DIR" >> "$WEB_LOG_FILE" 2>&1 || true
658-
else
659-
log_msg_to "📂 Repo $REPO already exists at $TARGET_DIR, skipping clone." "$GLOBAL" "$WEB_LOG_FILE"
660-
fi
657+
661658

662659
cd "$TARGET_DIR" || return 1
663660
# validate_prereqs || return 1
@@ -722,12 +719,9 @@ setup_web_python() {
722719
REPO="now-pytest-browserstack"
723720
TARGET_DIR="$WORKSPACE_DIR/$PROJECT_FOLDER/$REPO"
724721

725-
if [ ! -d "$TARGET_DIR" ]; then
726722
git clone https://github.com/browserstackCE/$REPO.git "$TARGET_DIR" >> "$WEB_LOG_FILE" 2>&1 || true
727723
log_msg_to "✅ Cloned repository: $REPO into $TARGET_DIR" "$PRE_RUN_LOG_FILE"
728-
else
729-
log_msg_to "ℹ️ Repository already exists at: $TARGET_DIR (skipping clone)"
730-
fi
724+
731725

732726
cd "$TARGET_DIR" || return 1
733727

@@ -808,12 +802,8 @@ setup_web_js() {
808802
mkdir -p "$WORKSPACE_DIR/$PROJECT_FOLDER"
809803

810804
# === 1️⃣ Clone Repo ===
811-
if [ ! -d "$TARGET_DIR" ]; then
812805
log_msg_to "📦 Cloning repo $REPO (branch tra) into $TARGET_DIR" "$GLOBAL" "$WEB_LOG_FILE"
813806
git clone -b tra https://github.com/browserstack/$REPO.git "$TARGET_DIR" >> "$WEB_LOG_FILE" 2>&1 || true
814-
else
815-
log_msg_to "📂 Repo $REPO already exists at $TARGET_DIR, skipping clone." "$GLOBAL" "$WEB_LOG_FILE"
816-
fi
817807

818808
cd "$TARGET_DIR" || return 1
819809
validate_prereqs || return 1
@@ -1052,12 +1042,8 @@ setup_mobile_python() {
10521042
TARGET_DIR="$WORKSPACE_DIR/$PROJECT_FOLDER/$REPO"
10531043

10541044
# Clone repo if not present
1055-
if [ ! -d "$TARGET_DIR" ]; then
10561045
git clone https://github.com/browserstack/$REPO.git "$TARGET_DIR"
10571046
log_msg_to "✅ Cloned repository: $REPO into $TARGET_DIR" "$PRE_RUN_LOG_FILE"
1058-
else
1059-
log_msg_to "ℹ️ Repository already exists at: $TARGET_DIR (skipping clone)" "$PRE_RUN_LOG_FILE"
1060-
fi
10611047

10621048
cd "$TARGET_DIR" || return 1
10631049

@@ -1196,12 +1182,8 @@ setup_mobile_java() {
11961182
REPO="browserstack-examples-appium-testng"
11971183
TARGET_DIR="$WORKSPACE_DIR/$PROJECT_FOLDER/$REPO"
11981184

1199-
if [ ! -d "$TARGET_DIR" ]; then
12001185
git clone https://github.com/BrowserStackCE/$REPO.git "$TARGET_DIR"
12011186
log_msg_to "✅ Cloned repository: $REPO into $TARGET_DIR" "$GLOBAL" "$MOBILE_LOG_FILE"
1202-
else
1203-
log_msg_to "ℹ️ Repository already exists at: $TARGET_DIR (skipping clone)" "$GLOBAL" "$MOBILE_LOG_FILE"
1204-
fi
12051187

12061188
# Update pom.xml → browserstack-java-sdk version to LATEST
12071189
pom_file="$TARGET_DIR/pom.xml"

0 commit comments

Comments
 (0)