Total Failures: 29 tests
Categories: 6 distinct failure groups
Analysis Date: March 9, 2026
The 29 test failures on Ubuntu are NOT platform-specific issues. They stem from recent code changes that introduced three critical bugs:
- Silent database connection failures causing empty output (15-17 failures)
- Missing text bundle registration for interactive command (2 failures)
- Incomplete builder configuration for UI commands (2 failures)
- Broken connection fallback logic (2 failures)
- Database connection errors in schema/table commands (7 failures)
- Normal execution with help text or database output
- For
--quietflag: Silent but successful output - For
-o envoption: Connection configuration display - For
-o dbxoption: DBX-format output
- Empty output (zero bytes from both stdout and stderr)
- Command exits without producing any console output
bin/systemInfo.js (line 84)
↓
Import base.js and call handler()
↓
handler() → base.promptHandler() → sysInfo() (line 81)
↓
sysInfo() tries: base.createDBConnection() (line 109)
↓
utils/base.js createDBConnection() (line 465-495)
↓
conn.createConnection(prompts) (line 473-474)
↓
utils/connections.js getConnOptions() (line 300-370)
↓
THROWS ERROR AT LINE 358:
"Missing configuration file. No default-env.json or substitute found"
↓
CAUGHT IN sysInfo() catch block (line 121-123)
↓
await base.error(error) → PROCESS EXIT (silently, no console output)
The base.error() function (location unknown but called at line 123 of systemInfo.js) is:
- Not printing the error message to console
- Exiting the process without any output
- OR: The error occurs before any console.log() calls can execute
Test Verification
- File: tests/SystemInfo.Test.js
- The base.myTest() helper (tests/base.js) throws error if stderr contains anything
- An error is being thrown but going to stderr silently
- Error thrown: utils/connections.js line 358
- Error caught: bin/systemInfo.js line 121-123
- Connection creation: utils/base.js line 465-495
- Ensure test environment has a default-env.json or
.envfile - OR: Use
VCAP_SERVICESenvironment variable - OR: Modify tests to mock the database connection
- OR: Improve error messaging to capture stderr properly
Test 1 (Line 120 in interactive.e2e.Test.js):
expect(output).to.include('No commands found matching "nope-command"')Test 2 (Line 137):
expect(output).to.match(/Executing:\s+version/)- String not found in output
- Regex pattern not matching the actual output
Interactive command uses text keys from _i18n/interactive.properties:
- Line 32:
searchNoResults=No commands found matching "{0}" - Line 57:
executeCommand=▶ Executing: {0}
However, in utils/base.js line 219-226, the additionalBundles array does NOT include 'interactive':
const additionalBundles = [
'duplicateDetection',
'compareData',
'dataDiff',
'dataLineage',
'dataProfile',
'dataValidator',
'export',
'referentialCheck'
// ❌ 'interactive' is MISSING!
]- Interactive command calls:
bundle.getText('searchNoResults', [searchTerm]) - The base bundle proxy (line 234-244) checks
additionalTextsfirst - Since 'interactive' wasn't loaded into
additionalTexts, the key is not found - Falls back to
baseBundle.getText()which doesn't have the key - Returns English fallback or empty string
- Missing bundle: utils/base.js line 219-226
- Text bundle loading: utils/base.js line 306-323
loadAdditionalTexts() - Text keys used in interactive: bin/interactive.js line 199 and line 746
Add 'interactive' to the additionalBundles array:
const additionalBundles = [
'duplicateDetection',
'compareData',
'dataDiff',
'dataLineage',
'dataProfile',
'dataValidator',
'export',
'referentialCheck',
'interactive' // ✅ ADD THIS
]Test 1 (Lines 31-36):
expect(stdout).to.match(/Documentation:\s+https:\/\/sap-samples\.github\.io\/hana-developer-cli-tool-example/i)
expect(stdout).to.include('hana-cli massConvert --help')Test 2 (Lines 38-44):
expect(stdout).to.match(/Examples:|EXAMPLES/i)
expect(stdout).to.include('hana-cli massConvertUI')- Help output exists but missing documentation links section
- Missing "See also:" section with related commands
- Missing "Examples:" section
File: bin/massConvertUI.js
export const builder = getMassConvertBuilder(true)The getMassConvertBuilder() function (utils/base.js line 599-690) sets up options but does NOT include:
.example()calls to define examples.epilog(buildDocEpilogue(...))to add documentation links
Comparison with working command (e.g., functions.js):
// ✅ FUNCTIONS.JS (WORKS)
export const builder = (yargs) => yargs
.options(baseLite.getBuilder({...}))
.wrap(160)
.example('hana-cli functions --function myFunction --schema MYSCHEMA', ...)
.epilog(buildDocEpilogue('functions', 'schema-tools', [...]))
// ❌ MASSCONVERTUI.JS (MISSING EXAMPLE AND EPILOG)
export const builder = getMassConvertBuilder(true)
// Returns yargs with only options, no example() or epilog()- Missing configuration: bin/massConvertUI.js line 8
- Function that needs fixing: utils/base.js line 599-690
getMassConvertBuilder() - Reference implementation: bin/massConvert.js line 25 (if it has this)
Option 1: Update massConvertUI.js to add epilogue:
export const builder = (yargs) => {
const baseBuilder = getMassConvertBuilder(true)
return baseBuilder
.example('hana-cli massConvertUI --schema SYS', baseLite.bundle.getText("massConvertUIExample"))
.epilog(buildDocEpilogue('massConvertUI', 'data-tools', ['massConvert', 'export']))
}Option 2: Modify getMassConvertBuilder to include these when ui=true
Functions test expects output for:
node bin/functions.js --quietnode bin/functions.js -l 10 --quietnode bin/functions.js -s SYS --quiet
Error: Missing configuration file. No default-env.json or substitute found...
- bin/functions.js line 62:
const db = await base.createDBConnection() - bin/tables.js line 88-89: Database client creation attempt
- Both fail when no configuration file exists
This is a test environment setup issue, not a code bug.
Same as Category 1 fixes:
- Add
default-env.jsonor.envto test environment - OR: Use environment variable
VCAP_SERVICES - OR: Mock the database connection in tests
// Test 47-51 in tests/errorHandling.Test.js
// Expects fallback to work when connection file doesn't exist
child_process.exec(
'node bin/tables.js --conn nonexistent-file-12345.env --quiet --limit 3',
(error, stdout, stderr) => {
base.assert.ok(!error, 'Should handle missing connection file with fallback logic')
}
)- Test is failing (error is being thrown instead of handled gracefully)
In utils/connections.js line 315-345:
// If user specified a connection file
if (prompts.conn) {
envFile = getFileCheckParents(prompts.conn)
if (!envFile) {
envFile = getFileCheckParents(`${homedir()}/.hana-cli/${prompts.conn}`)
}
}
// ISSUE: At this point, if prompts.conn was specified but NOT FOUND,
// envFile is still undefined. The fallback code below doesn't properly
// restore the fallback chain.
// Last resort
if (!envFile) {
envFile = getFileCheckParents(`${homedir()}/.hana-cli/default.json`)
}
// Only tries .env as fallback if envFile STILL not found
if (!envFile && !process.env.VCAP_SERVICES) {
const dotEnvFile = getEnv()
if (dotEnvFile) dotenv.config({ path: dotEnvFile, quiet: true })
}
// Then tries to load xsenv - but if no file was found, this will FAIL
xsenv.loadEnv(envFile) // ← FAILS HERE if envFile is null/undefined- When
--connspecifies a non-existent file, it should fall back to default-env.json, then .env - Currently, it only falls back to
default.jsonin user's home directory - Missing: Fallback to
default-env.jsonin current directory
- Fallback logic issue: utils/connections.js line 310-345
- Should check for default-env.json after failed --conn attempt
// After attempting to find the specified --conn file
if (prompts.conn) {
envFile = getFileCheckParents(prompts.conn)
if (!envFile) {
envFile = getFileCheckParents(`${homedir()}/.hana-cli/${prompts.conn}`)
}
// If still not found, DON'T give up yet - fall through to standard fallback
}
// Standard fallback (moved outside the if block)
if (!envFile) {
envFile = getFileCheckParents('default-env.json')
}
if (!envFile) {
envFile = getFileCheckParents(`${homedir()}/.hana-cli/default.json`)
}
if (!envFile && !process.env.VCAP_SERVICES) {
const dotEnvFile = getEnv()
if (dotEnvFile) dotenv.config({ path: dotEnvFile, quiet: true })
}// Test expects proper error handling for various scenarios
it("returns normal output", ...)Database connection failure with different error message format than expected.
| Category | Count | Root Cause | Type | Severity |
|---|---|---|---|---|
| systemInfo | 15 | Silent DB connection failure | Env Setup | HIGH |
| interactive | 2 | Missing 'interactive' in additionalBundles | Code Bug | HIGH |
| massConvertUI help | 2 | Missing .epilog() in builder | Code Bug | MEDIUM |
| functions/tables | 7 | Missing default-env.json | Env Setup | HIGH |
| error handling | 2 | Incomplete fallback logic | Code Bug | MEDIUM |
| querySimple | 1 | DB connection error | Env Setup | MEDIUM |
No - The issues are:
- Mostly code-related bugs (not platform-specific)
- Partially environment setup (missing config files)
- File path differences between Windows/Linux are not the cause
Possible reasons:
- Windows test machines may have configured
default-env.jsonor CI environment variables - Interactive tests may only run on Ubuntu CI
- Code paths that check for missing files behave differently in test environments
File: utils/base.js line 219-226
const additionalBundles = [
'duplicateDetection',
'compareData',
'dataDiff',
'dataLineage',
'dataProfile',
'dataValidator',
'export',
'referentialCheck',
'interactive' // Add this line
]File: utils/connections.js line 310-345
- Move standard fallback checks outside of
if (prompts.conn)block - Ensure proper fallback chain: specified file → default-env.json → .env → VCAP_SERVICES
File: bin/massConvertUI.js line 8 Add example and epilogue to builder function
For: systemInfo, functions, tables, querySimple tests
- Add
default-env.jsonto test CI environment - OR: Set
VCAP_SERVICESandTARGET_CONTAINERenvironment variables - OR: Mock database connections for tests
These issues likely stem from:
- Recent addition of interactive mode (new interactive.js command)
- Recent refactoring of connection handling (CDS binding resolution in connections.js)
- Recent documentation updates (doc-linker.js integration)
The code changes are approximately 1-4 weeks old based on feature completeness.