This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- task: NodeTool@0 | |
displayName: 'Run API Tests' | |
inputs: | |
versionSpec: '8.x' | |
- script: npm install newman -g | |
displayName: 'Install newman' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# filtering on 'highPriority' but ignoring any test tagged as 'Ignore' | |
- task: VSTest@2 | |
inputs: | |
testFiltercriteria: (TestCategory=highPriority&TestCategory!=Ignore) | |
# I.E. we add the 'testFiltercriteria' line to the 'inputs:' section of the Acceptance Tests | |
- task: VSBuild@1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sayHi(greeting){ | |
console.log(greeting) | |
} | |
sayHi("hello") | |
// 'greeting' variable contains the word 'Hello' when 'sayHi' is run | |
// but the 'greeting' variable no longer exists anywhere after 'sayHi' has finished executing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function first () { | |
console.log(1) | |
} | |
function second () { | |
console.log(2) | |
} | |
first(); | |
second(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
// Here we set which CI node/agent we want to run on | |
agent any | |
// Here we can set what environment we're running on, which browser etc... | |
parameters { | |
string(name: 'tests', defaultValue: 'RunCucumberTest', description: 'cucumber tests') | |
string(name: 'url', defaultValue: 'http://toolslist.safebear.co.uk:8080', description: 'test environment') | |
string(name: 'browser', defaultValue: 'chrome_headless', description: 'chrome headless') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker system prune --all --force --volumes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
set +e | |
sudo apt-get purge -y chromium-browser && \ | |
sudo apt autoremove -y && \ | |
sudo apt-get update && \ | |
sudo apt-get install -y libappindicator1 fonts-liberation && \ | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ | |
sudo dpkg -i google-chrome*.deb && \ | |
sudo apt-get install -f -y && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip && \ | |
unzip chromedriver_linux64.zip && \ | |
sudo rm /usr/local/bin/chromedriver && sudo mv chromedriver /usr/local/bin/ && \ | |
rm chromedriver_linux64.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.safebear.tasklist.controller; | |
import com.safebear.tasklist.service.TaskService; | |
import org.junit.Before; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; | |
import org.springframework.boot.test.mock.mockito.MockBean; | |
import org.springframework.http.MediaType; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.safebear.tasklist.model; | |
import org.assertj.core.api.Assertions; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManager; | |
import org.springframework.test.context.junit4.SpringRunner; | |
import java.time.LocalDate; |