Files
wehub-resource-sync 7a0da7932b
OSV-Scanner (Scheduled) / scan-scheduled (push) Failing after 0s
Create Release / test-gate (push) Has been cancelled
Create Release / release-gate (push) Has been cancelled
Create Release / ci-gate (push) Has been cancelled
Create Release / version-check (push) Has been cancelled
Create Release / e2e-test-gate (push) Has been cancelled
Create Release / responsive-test-gate (push) Has been cancelled
Create Release / compat-test-gate (push) Has been cancelled
Create Release / compose-integration-gate (push) Has been cancelled
Create Release / vulture-gate (push) Has been cancelled
Create Release / build (push) Has been cancelled
Create Release / provenance (push) Has been cancelled
Create Release / prerelease-docker (push) Has been cancelled
Create Release / publish-docker (push) Has been cancelled
Create Release / create-release (push) Has been cancelled
Create Release / cleanup-changelog (push) Has been cancelled
Create Release / trigger-pypi (push) Has been cancelled
Create Release / monitor-pypi (push) Has been cancelled
Create Release / Clean up orphan prerelease tags and signatures (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-form] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-metrics] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-workflow] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [settings-core] (push) Has been cancelled
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [history-news] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [library] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [link-analytics] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [chat-core] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [chat-lifecycle] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [error-benchmark] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [settings-pages] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) (push) Has been cancelled
Docker Tests (Consolidated) / Accessibility Tests (push) Has been cancelled
Docker Tests (Consolidated) / LLM Unit Tests (push) Has been cancelled
Docker Tests (Consolidated) / LLM Example Tests (push) Has been cancelled
Docker Tests (Consolidated) / Production Image Smoke Test (push) Has been cancelled
Docker Tests (Consolidated) / Infrastructure Tests (push) Has been cancelled
OSSF Scorecard / OSSF Security Scorecard Analysis (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [mobile] (push) Has been cancelled
Backwards Compatibility / Verify Encryption Constants (push) Has been cancelled
Backwards Compatibility / PyPI Version Compatibility (push) Has been cancelled
Backwards Compatibility / Database Migration Tests (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Docker Tests (Consolidated) / detect-changes (push) Has been cancelled
Docker Tests (Consolidated) / Build Test Image (push) Has been cancelled
Docker Tests (Consolidated) / All Pytest Tests + Coverage (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [accessibility] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [api-crud] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-login] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-pages] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-register] (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:08:55 +08:00

119 lines
2.7 KiB
Bash
Executable File

#!/bin/bash
# Script to run follow-up research tests locally
echo "🚀 Running Follow-up Research Tests"
echo "===================================="
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Check if server is running
check_server() {
curl -s -f http://127.0.0.1:5000 > /dev/null 2>&1
return $?
}
# Start server if not running
if ! check_server; then
echo -e "${YELLOW}Starting local server...${NC}"
(cd src && nohup python -m local_deep_research.web.app --port 5000 > ../server_test.log 2>&1 &)
SERVER_PID=$!
# Wait for server to start
for _ in {1..30}; do
if check_server; then
echo -e "${GREEN}Server started successfully${NC}"
break
fi
sleep 1
done
if ! check_server; then
echo -e "${RED}Failed to start server${NC}"
cat server_test.log
exit 1
fi
else
echo -e "${GREEN}Server already running${NC}"
SERVER_PID=""
fi
# Create test directories
mkdir -p tests/ui_tests/screenshots/followup
mkdir -p tests/ui_tests/results/followup
# Run API tests
echo ""
echo "📝 Running API Tests..."
echo "----------------------"
pdm run pytest tests/test_followup_api.py -v --tb=short
API_EXIT_CODE=$?
if [ $API_EXIT_CODE -eq 0 ]; then
echo -e "${GREEN}✓ API tests passed${NC}"
else
echo -e "${RED}✗ API tests failed${NC}"
fi
# Run UI tests
echo ""
echo "🖥️ Running UI Tests..."
echo "---------------------"
cd tests/ui_tests || exit 1
# Install npm dependencies if needed
if [ ! -d "node_modules" ]; then
echo "Installing npm dependencies..."
npm ci
fi
# Run the follow-up research test
HEADLESS=false timeout 300 node test_followup_research.js
UI_EXIT_CODE=$?
cd ../..
if [ $UI_EXIT_CODE -eq 0 ]; then
echo -e "${GREEN}✓ UI tests passed${NC}"
else
echo -e "${RED}✗ UI tests failed or timed out${NC}"
fi
# Stop server if we started it
if [ -n "$SERVER_PID" ]; then
echo ""
echo "Stopping test server..."
kill $SERVER_PID 2>/dev/null
fi
# Summary
echo ""
echo "===================================="
echo "Test Summary:"
echo "===================================="
if [ $API_EXIT_CODE -eq 0 ]; then
echo -e "${GREEN}✓ API Tests: PASSED${NC}"
else
echo -e "${RED}✗ API Tests: FAILED${NC}"
fi
if [ $UI_EXIT_CODE -eq 0 ]; then
echo -e "${GREEN}✓ UI Tests: PASSED${NC}"
else
echo -e "${RED}✗ UI Tests: FAILED${NC}"
fi
# Exit with error if any test failed
if [ $API_EXIT_CODE -ne 0 ] || [ $UI_EXIT_CODE -ne 0 ]; then
echo ""
echo -e "${RED}Some tests failed. Please check the output above.${NC}"
exit 1
else
echo ""
echo -e "${GREEN}All tests passed successfully! 🎉${NC}"
exit 0
fi