Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
362378ac
Commit
362378ac
authored
Jul 08, 2016
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sauce tests
parent
2583e189
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
203 additions
and
54 deletions
+203
-54
.travis.yml
.travis.yml
+1
-9
browser_tests.sh
ci/browser_tests.sh
+43
-0
sauceDisconnect.js
ci/sauceDisconnect.js
+72
-0
nightwatch.js
nightwatch.js
+79
-0
nightwatch.json
nightwatch.json
+0
-42
package.json
package.json
+8
-3
No files found.
.travis.yml
View file @
362378ac
language
:
node_js
node_js
:
-
stable
# This is disabled until we can stablize the nightwatch testing process
#before_script:
# - npm run serve &
script
:
-
npm run lint && npm run test && npm run build
# && nightwatch --env remote
# - pkill node
#addons:
# sauce_connect:
# username: "chriseth"
# access_key: "b781828a-9e9c-43d8-89d4-2fbb879595ca"
-
bash ci/browser_tests.sh
deploy
:
provider
:
script
script
:
ci/deploy_from_travis.sh
...
...
ci/browser_tests.sh
0 → 100644
View file @
362378ac
#!/bin/bash
SAUCECONNECT_URL
=
"http://saucelabs.com/downloads/sc-4.3.16-linux.tar.gz"
SAUCECONNECT_USERNAME
=
"chriseth"
SAUCECONNECT_ACCESSKEY
=
"b781828a-9e9c-43d8-89d4-2fbb879595ca"
SAUCECONNECT_JOBIDENTIFIER
=
"browsersolidity_tests_
${
TRAVIS_JOB_NUMBER
}
"
SAUCECONNECT_READYFILE
=
"sc.ready"
TEST_EXITCODE
=
0
npm run build
npm run serve &
wget
$SAUCECONNECT_URL
tar
-zxvf
sc-4.3.16-linux.tar.gz
./sc-4.3.16-linux/bin/sc
-u
$SAUCECONNECT_USERNAME
-k
$SAUCECONNECT_ACCESSKEY
-i
$SAUCECONNECT_JOBIDENTIFIER
--readyfile
$SAUCECONNECT_READYFILE
&
while
[
!
-f
$SAUCECONNECT_READYFILE
]
;
do
sleep
.5
done
function
updateTestExitCode
()
{
if
[
$?
-eq
1
]
then
TEST_EXITCODE
=
1
fi
}
npm run browser-test-remote-firefox
updateTestExitCode
npm run browser-test-remote-chrome
updateTestExitCode
npm run browser-test-remote-safari
updateTestExitCode
npm run browser-test-remote-ie
updateTestExitCode
node ci/sauceDisconnect.js
$SAUCECONNECT_USERNAME
$SAUCECONNECT_ACCESSKEY
$SAUCECONNECT_JOBIDENTIFIER
echo
$TEST_EXITCODE
if
[
$TEST_EXITCODE
-eq
1
]
then
exit
1
fi
ci/sauceDisconnect.js
0 → 100644
View file @
362378ac
const
https
=
require
(
'https'
)
var
userName
=
process
.
argv
[
2
]
var
accessKey
=
process
.
argv
[
3
]
var
tunnelName
=
process
.
argv
[
4
]
function
removeTunnel
()
{
const
requestPath
=
`/rest/v1/
${
userName
}
/tunnels`
console
.
log
(
requestPath
)
callSauce
(
requestPath
,
'GET'
,
function
(
error
,
result
)
{
if
(
error
)
{
console
.
log
(
error
)
}
else
{
var
data
=
JSON
.
parse
(
result
)
for
(
var
k
in
data
)
{
retrieveTunnel
(
data
[
k
],
function
(
error
,
result
)
{
if
(
error
)
{
console
.
log
(
error
)
}
else
if
(
result
.
identtifier
===
tunnelName
)
{
deleteTunnel
(
result
.
id
,
function
()
{
console
.
log
(
'tunnel deleted '
+
data
[
k
]
+
' '
+
tunnelName
)
})
}
})
}
}
})
}
function
retrieveTunnel
(
tunnelid
,
callback
)
{
const
requestPath
=
`/rest/v1/
${
userName
}
/tunnels/
${
tunnelid
}
`
callSauce
(
requestPath
,
'GET'
,
function
(
error
,
result
)
{
if
(
error
)
{
callback
(
error
)
}
else
{
callback
(
null
,
{
'identtifier'
:
JSON
.
parse
(
result
).
tunnel_identifier
,
'id'
:
tunnelid
})
}
})
}
function
deleteTunnel
(
tunnelid
,
callback
)
{
const
requestPath
=
`/rest/v1/
${
userName
}
/tunnels/
${
tunnelid
}
`
callSauce
(
requestPath
,
'DELETE'
,
callback
)
}
function
callSauce
(
requestPath
,
type
,
callback
)
{
function
responseCallback
(
res
)
{
res
.
setEncoding
(
'utf8'
)
console
.
log
(
'Response: '
,
res
.
statusCode
,
JSON
.
stringify
(
res
.
headers
))
res
.
on
(
'data'
,
function
onData
(
chunk
)
{
console
.
log
(
'BODY: '
+
chunk
)
callback
(
null
,
chunk
)
})
res
.
on
(
'end'
,
function
onEnd
()
{})
}
var
req
=
https
.
request
({
hostname
:
'saucelabs.com'
,
path
:
requestPath
,
method
:
type
,
auth
:
userName
+
':'
+
accessKey
},
responseCallback
)
req
.
on
(
'error'
,
function
onError
(
e
)
{
console
.
log
(
'problem with request: '
+
e
.
message
)
callback
(
e
.
message
)
})
req
.
write
(
''
)
req
.
end
()
}
removeTunnel
()
nightwatch.js
0 → 100644
View file @
362378ac
'use strict'
var
TRAVIS_JOB_NUMBER
=
process
.
env
.
TRAVIS_JOB_NUMBER
module
.
exports
=
{
'src_folders'
:
[
'test-browser'
],
'output_folder'
:
'reports'
,
'custom_commands_path'
:
''
,
'custom_assertions_path'
:
''
,
'page_objects_path'
:
''
,
'globals_path'
:
''
,
'test_settings'
:
{
'default'
:
{
'launch_url'
:
'http://ondemand.saucelabs.com:80'
,
'selenium_host'
:
'ondemand.saucelabs.com'
,
'selenium_port'
:
80
,
'silent'
:
true
,
'username'
:
'chriseth'
,
'access_key'
:
'b781828a-9e9c-43d8-89d4-2fbb879595ca'
,
'use_ssl'
:
false
,
'globals'
:
{
'waitForConditionTimeout'
:
10000
,
'asyncHookTimeout'
:
100000
},
'screenshots'
:
{
'enabled'
:
false
,
'path'
:
''
},
'desiredCapabilities'
:
{
'browserName'
:
'firefox'
,
'javascriptEnabled'
:
true
,
'acceptSslCerts'
:
true
,
'build'
:
'build-'
+
TRAVIS_JOB_NUMBER
,
'tunnel-identifier'
:
'browsersolidity_tests_'
+
TRAVIS_JOB_NUMBER
}
},
'chrome'
:
{
'desiredCapabilities'
:
{
'browserName'
:
'chrome'
,
'javascriptEnabled'
:
true
,
'acceptSslCerts'
:
true
,
'build'
:
'build-'
+
TRAVIS_JOB_NUMBER
,
'tunnel-identifier'
:
'browsersolidity_tests_'
+
TRAVIS_JOB_NUMBER
}
},
'safari'
:
{
'desiredCapabilities'
:
{
'browserName'
:
'safari'
,
'javascriptEnabled'
:
true
,
'acceptSslCerts'
:
true
,
'build'
:
'build-'
+
TRAVIS_JOB_NUMBER
,
'tunnel-identifier'
:
'browsersolidity_tests_'
+
TRAVIS_JOB_NUMBER
}
},
'ie'
:
{
'desiredCapabilities'
:
{
'browserName'
:
'internet explorer'
,
'javascriptEnabled'
:
true
,
'acceptSslCerts'
:
true
,
'build'
:
'build-'
+
TRAVIS_JOB_NUMBER
,
'tunnel-identifier'
:
'browsersolidity_tests_'
+
TRAVIS_JOB_NUMBER
}
},
'local'
:
{
'launch_url'
:
'http://localhost:8080'
,
'selenium_port'
:
4444
,
'selenium_host'
:
'localhost'
,
'desiredCapabilities'
:
{
'browserName'
:
'firefox'
,
'javascriptEnabled'
:
true
,
'acceptSslCerts'
:
true
}
}
}
}
nightwatch.json
deleted
100644 → 0
View file @
2583e189
{
"src_folders"
:
[
"test-browser"
],
"output_folder"
:
"reports"
,
"custom_commands_path"
:
""
,
"custom_assertions_path"
:
""
,
"page_objects_path"
:
""
,
"globals_path"
:
""
,
"test_settings"
:
{
"default"
:
{
"launch_url"
:
"http://ondemand.saucelabs.com:80"
,
"selenium_port"
:
80
,
"selenium_host"
:
"ondemand.saucelabs.com"
,
"silent"
:
true
,
"username"
:
"chriseth"
,
"access_key"
:
"b781828a-9e9c-43d8-89d4-2fbb879595ca"
,
"screenshots"
:
{
"enabled"
:
false
},
"globals"
:
{
"waitForConditionTimeout"
:
60000
}
},
"remote"
:
{
"desiredCapabilities"
:
{
"browserName"
:
"firefox"
,
"javascriptEnabled"
:
true
,
"acceptSslCerts"
:
true
}
},
"local"
:
{
"launch_url"
:
"http://localhost:8080"
,
"selenium_port"
:
4444
,
"selenium_host"
:
"localhost"
,
"desiredCapabilities"
:
{
"browserName"
:
"firefox"
,
"javascriptEnabled"
:
true
,
"acceptSslCerts"
:
true
}
}
}
}
package.json
View file @
362378ac
...
...
@@ -4,8 +4,11 @@
"description"
:
"Minimalistic browser-based Solidity IDE"
,
"scripts"
:
{
"test"
:
"node test/index.js"
,
"browser-test"
:
"nightwatch --env local"
,
"browser-test-sc"
:
"nightwatch --env remote"
,
"browser-test"
:
"nightwatch --config nightwatch.js --env local"
,
"browser-test-remote-firefox"
:
"nightwatch --config nightwatch.js --env default"
,
"browser-test-remote-ie"
:
"nightwatch --config nightwatch.js --env ie"
,
"browser-test-remote-chrome"
:
"nightwatch --config nightwatch.js --env chrome"
,
"browser-test-remote-safari"
:
"nightwatch --config nightwatch.js --env safari"
,
"build"
:
"mkdir -p build; browserify src/index.js -o build/app.js"
,
"lint"
:
"semistandard"
,
"serve"
:
"http-server ."
...
...
@@ -48,7 +51,9 @@
"ignore"
:
[
"assets/js/"
,
"build/"
,
"src/mode-solidity.js"
"src/mode-solidity.js"
,
"nightwatch.js"
,
"ci/sauceDisconnect.js"
]
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment