Prerequisites
Before testing, ensure you have:- ✅ Node.js 20+ installed
- ✅ Python 3.11+ installed
- ✅ PostgreSQL database running
- ✅
.envfile configured with database credentials - ✅ All dependencies installed (
npm installin root andclient/)
Development Testing
Step 1: Install Dependencies
Step 2: Start Development Mode
Theelectron:dev script will:
- Start the Vite dev server (frontend) on port 5173
- Wait for the frontend to be ready
- Launch Electron with hot-reload enabled
- Electron main process starts
- Python FastAPI server is automatically spawned on port 8000
- Electron window opens and loads
http://localhost:5173 - DevTools are automatically opened for debugging
Step 3: Verify Functionality
Check the following:- Window Opens: Electron window should appear with CreditNexus UI
- Backend Connection: Check DevTools console for API connection status
- IPC Communication: Test
window.electronAPI.getServerUrl()in console - Server Health: Backend should be accessible at
http://localhost:8000 - Hot Reload: Make frontend changes and verify they appear automatically
Step 4: Test Key Features
- ✅ Login/Registration
- ✅ Unified Dashboard tabs
- ✅ Permission-based UI (tabs should show/hide based on user role)
- ✅ API calls to backend
- ✅ FDC3 context broadcasting (if OpenFin/FDC3 available)
Production Build Testing
Step 1: Build the Frontend
client/dist/
Step 2: Build Electron App
For Windows:Step 3: Find Build Artifacts
Builds are output todist-electron/:
- Windows:
CreditNexus Setup X.X.X.exe(NSIS installer) andCreditNexus X.X.X.exe(portable) - macOS:
CreditNexus-X.X.X.dmgandCreditNexus-X.X.X-mac.zip - Linux:
CreditNexus-X.X.X.AppImageandCreditNexus_X.X.X_amd64.deb
Step 4: Test Production Build
-
Install/Run the built application
- Windows: Run the
.exeinstaller or portable executable - macOS: Open the
.dmgand drag to Applications - Linux: Make AppImage executable (
chmod +x) and run, or install.deb
- Windows: Run the
-
Verify Production Mode
- Window should load from
file://protocol (nothttp://localhost) - No DevTools should be open by default
- Backend server should still auto-start
- Window should load from
-
Test Offline Capability
- Close the app
- Disconnect from internet
- Reopen app - backend should still work (local server)
Manual Testing Checklist
Electron Main Process
- Window opens with correct size (1400x900)
- Window is resizable and has minimum size (1024x768)
- Icon displays correctly
- Python server starts automatically
- Server health check works
- IPC handlers respond correctly
Frontend Integration
- React app loads in Electron window
- API calls work (check Network tab in DevTools)
- Authentication flow works
- Unified Dashboard displays correctly
- Tabs show/hide based on permissions
- Navigation works
Backend Integration
- FastAPI server starts on port 8000
- API endpoints respond correctly
- Database connections work
- Authentication endpoints work
- CORS is properly configured
FDC3/Desktop Integration
- FDC3 bridge initializes (if available)
- Context broadcasting works
- Intent handling works
- Interoperability with other FDC3 apps (if installed)
Debugging Tips
View Main Process Logs
Electron main process logs appear in the terminal where you rannpm run electron:dev.
View Renderer Process Logs
Open DevTools (automatically opened in dev mode):- Windows/Linux:
Ctrl+Shift+IorF12 - macOS:
Cmd+Option+I
Check Server Status
In DevTools console:Common Issues
Issue: “Cannot find module ‘electron’”- Solution: Run
npm installin the root directory
- Solution: Ensure
npm run frontendworks separately, check port 5173 is available
- Solution: Check Python is in PATH, verify
server.pyexists, check.envfile
- Solution: Ensure
client/distexists (runnpm run client:buildfirst for production)
- Solution: Check DevTools console for errors, verify frontend build completed
Testing with Different User Roles
Test permission-based UI by logging in as different user roles:- Admin: Should see all tabs
- Trader: Should see Trading, Portfolio, Market tabs
- Compliance Officer: Should see Compliance tab
- Applicant: Should see limited tabs (Applications, Deals)
Automated Testing (Future)
Consider adding:- Electron-specific unit tests with Spectron or Playwright
- E2E tests for critical user flows
- Integration tests for IPC communication
- Backend API tests
CI/CD Testing
The GitHub Actions workflow (.github/workflows/build-electron.yml) automatically:
- Builds for Windows, macOS, and Linux
- Uploads artifacts for download
- Can be extended to run automated tests
Next Steps
After successful testing:- Test on different operating systems
- Test with different screen resolutions
- Test offline functionality
- Test with different database configurations
- Performance testing with large datasets
- Security testing (especially IPC communication)