I’m always doing the same thing. Different task. Same thing though.
Running tests. Checking results. Reading log files. Making fixes. Repeat.
Here’s what I do to save time, effort, money…..
============================================================
Type “1183” or what ever Jira task id I’m working on.
That sets up all the context for task 1183.
It automatically displays the relevant test suite and parses for all the test cases
/workspace3/
MY_SUITE = FoobarTests
public void test1() throws Exception {
public void test2() throws Exception {
public void test3() throws Exception {
Current test case: test2
MY_PARAMS = -a -b -c -d
MY_ACCOUNT = ScottsPowerUser
accountId = 1234
Environment = Test
============================================================
I want to display the results of previous tests. I don’t like the default logging so I created my own.
Type “listlogs”
(1) 1183.20170327:165809–
Description: try to repro issue
Assessment: Workflow took too long
[java] TotalTests: [5]
[java] PassedTests: [4]
[java] FailedTests: [0]
[java] CancelledTests: [1]
BUILD FAILED
Total time: 183 minutes 51 seconds
(2) 1183.20170330:113638–
Description: Fixed ABC, try to repro failure
Assessment: Looks good
[java] TotalTests: [5]
[java] PassedTests: [5]
[java] FailedTests: [0]
[java] CancelledTests: [0]
BUILD SUCCESSFUL
Total time: 114 minutes 7 seconds
============================================================
I’ve made another change and want to test before committing my work.
I’m too lazy to type a long complex command line to kick off my test so created another shortcut.
This just formulates the command so I can double check before running.
$echoruntest “run againsts test env with foobar parameter”
/workspace3/
cmd = nohup run-test -DcliArgs=”-env test -user ScottsPowerUser –test FoobarTests.test2 -a -b -c -d” > /home/scottwilson/1183.20170417:
Ok that looks good let’s run for real.
$runtest “run againsts test env with foobar parameter”
nohup run-test -DcliArgs=”-env test -user ScottsPowerUser –test FoobarTests.test2 -a -b -c -d” > /home/scottwilson/1183.20170417:
============================================================
I want to follow the progress. Sometimes I have a bunch of tests running at the same time.
$followlogs 10 30
iterations = 10
sleepIncr = 30
(1) 1183.20170327:165809.test.FoobarTests.
(2) 1183.20170330:113638.test.FoobarTests.
(3) 1183.20170401:093638.test.FoobarTests.
sleepingr 30 seconds…………………………
iteration #9
(1) 1183.20170327:165809.test.FoobarTests.
(2) 1183.20170330:113638.test.FoobarTests.
(3) 1183.20170401:093638.test.FoobarTests.
============================================================
Sometimes I want to see what processes are running.
You can also copy & paste the kill command if you want to terminate the job.
myps
ps auxwww | grep FoobarTests | grep myCurrentTest
EF314DE99D6BA51BB8 –lang=en-US –extension-process –enable-offline-auto-reload –enable-offline-auto-reload-visible-only –blink-settings=disallowFetchForDocWrittenScriptsInMainFrame=false,disallowFetchForDocWrittenScriptsInMainFrameOnSlowConnections=true –enable-pinch –num-raster-threads=2 –enable-zero-copy –enable-gpu-memory-buffer-compositor-resources –enable-main-frame-before-activation –content-image-texture-target=0,0,3553;0,1,3553;0,2,3553;0,3,3553;0,4,3553;0,5,3553;0,6,3553;0,7,3553;0,8,3553;0,9,3553;0,10,34037;0,11,34037;0,12,34037;0,13,3553;0,14,3553;0,15,3553;1,0,3553;1,1,3553;1,2,3553;1,3,3553;1,4,3553;1,5,3553;1,6,3553;1,7,3553;1,8,3553;1,9,3553;1,10,34037;1,11,34037;1,12,34037;1,13,3553;1,14,3553;1,15,3553;2,0,3553;2,1,3553;2,2,3553;2,3,3553;2,4,3553;2,5,34037;2,6,3553;2,7,3553;2,8,3553;2,9,3553;2,10,3553;2,11,3553;2,12,34037;2,13,3553;2,14,34037;2,15,34037;3,0,3553;3,1,3553;3,2,3553;3,3,3553;3,4,3553;3,5,34037;3,6,3553;3,7,3553;3,8,3553;3,9,3553;3,10,3553;3,11,3553;3,12,34037;3,13,3553;3,14,34037;3,15,34037 –disable-accelerated-video-decode –disable-webrtc-hw-vp8-encoding –service-request-channel-token=C324011AF3D99DEF314DE99D6BA51BB8 –renderer-client-id=1589
Num processes: 2
kill -9 21246
kill -9 21455
============================================================
I’ve been using tricks like this for years to save time, effort, money.
If you’d like to learn how to do this reach out to me on social media.