apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
yum install -y xorg-x11-server-Xvfb gtk2-devel gtk3-devel libnotify-devel GConf2 nss libXScrnSaver alsa-lib
cd /your/project/path
npm install cypress --save-dev
./node_modules/cypress/bin/cypress open
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb
npx cypress run
./node_modules/cypress/bin/cypress open --env test={test},test1={test1}
vi cypress.config.js
const { defineConfig } = require('cypress')
const fs = require('fs-extra')
const path = require('path')
async function getConfigurationByFile(test, test1) {
const pathToConfigFile = path.resolve('/cypress', 'config', `${file}.json`);
let readJson = await fs.readJson(pathToConfigFile).then((config) => {
config.env.test = test;
config.env.test1 = test1;
return config;
});
return readJson;
}
module.exports = defineConfig({
e2e: {
experimentalSessionAndOrigin: true,
setupNodeEvents(on, config) {
const test = config.env.test;
const test1 = config.env.test1;
return getConfigurationByFile(test, test1);
},
video: false,
screenshotOnRunFailure: false,
},
})
// 전달 받은 args 값 TEST 에서 사용할 수 있도록 env 세팅
let readJson = await fs.readJson(pathToConfigFile).then((config) => {
config.env.test = test;
// 전달할 env 값에 args 세팅 ..add
return config;
});
describe('############# { 즐거운 테스트 } #############', () => {
it('TEST', () => {
cy.request({
method: 'GET',
url: 'localhost/',
headers: {
'accept': 'application/json;charset=UTF-8',
'authorize': 'TEST '+Cypress.env('test'),
},
...
});
});
describe('############# { 즐거운 테스트 } #############', () => {
it('TEST', () => {
cy.request({
method: 'GET',
url: 'localhost/',
headers: {
'accept': 'application/json;charset=UTF-8',
'authorize': 'TEST '+Cypress.env('test'),
},
failOnStatusCode:false, // 값을 false 로 준다.
...
}).then((response) => {
expect(response.body.status).to.eq('422');
});
});
Langchain 과 Few-Shot 프롬프트 엔지니어링 (feat. OpenAI) (0) | 2024.07.29 |
---|---|
Langchain 과 OpenAI 를 이용한 데이터 임베딩과 RAG(Retrieval-Augmented Generation) (2) | 2024.07.05 |
SpringBoot APM - Prometheus 란? (0) | 2023.04.20 |
GIT: Interactive 와 vscode에서 사용하기 (0) | 2022.07.04 |
redis queue system (1) | 2022.03.30 |