TestUp2 - unable to run tests


#1

Hi, I tried to run some unit tests on TestUp, but I’m getting a JavaScript error which seems to be related to Minitest.
testup_js_error

It doesn’t seem like I can successfully run any tests. Also, in the TestUp dialog, the cursor has a spinning wheel icon even after I run the tests. Does anyone know how I can fix this issue?

Thanks,
Kevin


#2

I prefer using Minitest from a command prompt, with test selection based on folder/file names.

Hence, I’ve got a Git repo SUMT. I don’t recall whether they’re still “sync’d”, but docs for it are here. The page linked is the ReadMe, which should give you a good idea of how SUMT works…

Greg


#3

What version of IE do you have on your system?

What test were you trying to run?


#4

I have IE version: 11.0.9600.18762 on Windows, and I am trying to run assert_equal tests.

Snippet ruby code inside a test function:
line.description = “Test”
assert_equal(“Test”, line.description)

Correct me if I’m wrong, but I thought the above code would pass. The TestUp dialog doesn’t indicate that anything passed though (after clicking the Run button).
tc_costline

Below is what is displayed on Ruby Console in SU


#5

The results shown in the console indicate that you have one test method containing 13 assertion statements, and there were no failures, errors, or skips. IOW, the code passed.

@tt_su is the person to ask about the TestUp-2 UI.


#6

I see, my mistake. I just assumed that the UI would update if a test had passed (Passed: 1).


#7

Also, I’ve added a failure message in assert_equal, but the message doesn’t seem to appear / I can’t find it anywhere after running a failed test. Is this normal behavior?


#8

FWIW, I wouldn’t call that a mistake. Maybe you’re new to testing, but we’re all new to everything once, and we all forget…

Have you checked the log files? The file name is listed in the console output. I can’t recall where TestUp-2 puts the various Minitest data, as TestUp-2 outputs to the console, the Dialog, and the log file…

Background

I maintain a GitHub.io site with doc’s for Ruby, several gems, and the SketchUp API. A reference of assertions in the current Minitest gem is here.

TestUp-2 uses Minitest for the test framework, but adds a GUI using a WebDialog for test selection and reporting. It was writtten by @ThomThom / @tt_su

Most of the testing I have worked with is run in stand-alone Ruby, so I’m used to running tests with the Rake task or Bundler (which normally uses the Rake task). That’s why I wrote SUMT, as it mimics much of the syntax used for running Minitest in a Ruby console setting. Also, for large test suites, I found TestUp-2 got in my way, but most plugins won’t require that many tests.

Anyway, because of that, using TestUp-2 isn’t quite fresh in my mind…

Greg


#9

It should…

This is what you should expect to see:

This must relate to the JavaScript errors you are seeing. Can you upload a complete testcase file that reproduce this? I’ve not seen that error before.

(Also, have you tried running the default TestUp tests?)


#10

Here is a testcase file: TC_Test.rb (190 Bytes)

I don’t remember seeing the default TestUp tests, where can I find them? (Unless you’re referring to the paths initially listed in ‘Test suite paths’ in ‘Preferences’, those paths did not exist for me.)


#11

Did you run TestUp from git source?

The tests come with the repository when you clone it: https://github.com/SketchUp/testup-2/tree/master/tests


#12

I tried the file on my machine (Win10 IE11), worked fine:

image

If you are not using latest from GitHub, can you try that? If that also fails then it sounds like something is wrong with your IE. (I’ve had extension users with problems with IE needing to be repaired before.)


#13

Alright, I cloned the latest version from GitHub, then added it to my SU plugin loader script (instead of installing as an RBZ). When I opened up SketchUp, I got this:
su_load_errors

After looking at the second line of that error message, “SKUI” in the “third-party” folder did not exist when I checked in File Explorer. I then downloaded SKUI from GitHub (https://github.com/thomthom/SKUI) and added that to the correct path.

I opened up SU again, there was no Load Errors message this time. I then clicked on “Open TestUp” button in the TestUp toolbar and get this:
testup_blank

I then repaired IE, but I still got the same blank dialog.


#14

SKUI is included as a submodule. If you use a UI client like SourceTree or GitKraken it should pull in those automatically.

But if you are going from the console when you need to manually update the submodules:

git submodule init
git submodule update

If you clone from skratch then you could use this command:

git clone --recursive YOUR-GIT-REPO-URL

#15

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.