File tree 7 files changed +82
-0
lines changed
7 files changed +82
-0
lines changed Original file line number Diff line number Diff line change
1
+ # IntelliJ
2
+ .idea /
3
+
1
4
# Logs
2
5
logs
3
6
* .log
Original file line number Diff line number Diff line change 1
1
# bacit-testing
2
2
Utforsker mulige rammeverk for testing som kan introduserer i BACIT
3
+
4
+ ## cucumber
5
+ Adverds-drevet utvikling (en. "Behaviour Driven Development")
6
+ * installer Node.js/npm
7
+ * installer Cucumber
8
+ * lær grunnleggende syntaks i Cucumber og Gherkin
9
+
10
+ ### Steg i Gherkin (samsvarer med Definisjon av Steg)
11
+ Scenario: Breaker guesses a word
12
+   ;  ; Given the Maker has chosen a word
13
+   ;  ; When the Breaker makes a guess
14
+   ;  ; Then the Maker is asked to score
15
+
16
+ ### Definisjon av Steg (manipulerer systemet)
17
+ ```
18
+ When("{maker} starts a game", function(maker) {
19
+ maker.startGameWithWord({ word: "whale" })
20
+ })
21
+ ```
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " bacit-testing" ,
3
+ "version" : " 1.0.0" ,
4
+ "description" : " Checking out some testing frameworks for a university study program" ,
5
+ "main" : " index.js" ,
6
+ "dependencies" : {
7
+ "selenium-webdriver" : " ^4.0.0"
8
+ },
9
+ "devDependencies" : {
10
+ "@cucumber/cucumber" : " ^8.0.0-rc.1" ,
11
+ "chromedriver" : " ^95.0.0" ,
12
+ "jest" : " ^27.3.1"
13
+ },
14
+ "scripts" : {
15
+ "test" : " jest"
16
+ },
17
+ "repository" : {
18
+ "type" : " git" ,
19
+ "url" : " git+https://github.com/digitnow/bacit-testing.git"
20
+ },
21
+ "keywords" : [
22
+ " testing" ,
23
+ " bacit" ,
24
+ " javascript" ,
25
+ " browser"
26
+ ],
27
+ "author" : " Janis Gailis" ,
28
+ "license" : " ISC" ,
29
+ "bugs" : {
30
+ "url" : " https://github.com/digitnow/bacit-testing/issues"
31
+ },
32
+ "homepage" : " https://github.com/digitnow/bacit-testing#readme"
33
+ }
Original file line number Diff line number Diff line change
1
+ function sum ( a , b ) {
2
+ return a + b ;
3
+ } ;
4
+ module . exports = sum ;
Original file line number Diff line number Diff line change
1
+ const sum = require ( './sum' ) ;
2
+
3
+ test ( 'adds 1 + 2 to equal 3' , ( ) => {
4
+ expect ( sum ( 1 , 2 ) ) . toBe ( 3 ) ;
5
+ } ) ;
Original file line number Diff line number Diff line change
1
+ const { By, Key, Builder} = require ( "selenium-webdriver" ) ;
2
+ require ( "chromedriver" ) ;
3
+
4
+ async function testResultPageTitle ( ) {
5
+ //var searchString = "Automated testing with Selenium";
6
+ let driver = await new Builder ( ) . forBrowser ( "chrome" ) . build ( ) ;
7
+ await driver . get ( "https://bacit.info" ) ;
8
+ //await driver.findElement(By.name("q")).sendKeys(searchString, Key.RETURN);
9
+ var title = await driver . getTitle ( ) ;
10
+ console . log ( "Title is:" , title ) ;
11
+ await driver . quit ( ) ;
12
+ }
13
+ testResultPageTitle ( ) ;
14
+
Original file line number Diff line number Diff line change
1
+ Scenario : Breaker guesses a word
2
+ Given the Maker has chosen a word
3
+ When the Breaker makes a guess
4
+ Then the Maker is asked to score
You can’t perform that action at this time.
0 commit comments