-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathset-up.sh
More file actions
71 lines (51 loc) · 1.12 KB
/
Copy pathset-up.sh
File metadata and controls
71 lines (51 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
echo "=================================="
echo "QA API Testing - Setup"
echo "=================================="
echo ""
echo "Verificando Node.js..."
if ! command -v node &> /dev/null
then
echo "ERROR: Node.js no está instalado"
exit 1
fi
echo "Node.js encontrado"
echo ""
echo "Verificando npm..."
if ! command -v npm &> /dev/null
then
echo "ERROR: npm no está instalado"
exit 1
fi
echo "npm encontrado"
echo ""
echo "Verificando Newman..."
if ! command -v newman &> /dev/null
then
echo "Newman no encontrado"
echo ""
echo "Instalando Newman..."
npm install -g newman
if [ $? -ne 0 ]; then
echo "ERROR: no se pudo instalar Newman"
exit 1
fi
fi
echo "Newman encontrado"
echo ""
echo "Creando directorios necesarios..."
mkdir -p newman/results
echo "Directorios creados"
echo ""
echo "Asignando permisos..."
chmod +x newman/run.sh
echo "Permisos asignados"
echo ""
echo "=================================="
echo "Entorno listo"
echo "=================================="
echo ""
echo "Para ejecutar las pruebas:"
echo ""
echo "cd newman"
echo "./run.sh"