Skip to content

Conversation

@ono-max
Copy link
Contributor

@ono-max ono-max commented Oct 24, 2025

cloudbees-oss/smart-tests-integration-examples#96

Sample Junit XML file

<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="2.608" tests="3" failures="2">
  <testsuite name="Root Suite" timestamp="2025-10-27T00:42:58" tests="0" time="0.000" failures="0">
  </testsuite>
  <testsuite name="Basic Website Testing" timestamp="2025-10-27T00:42:58" tests="2" file="/Users/ono-max/src/github.com/cloudbees-oss/smart-tests-integration-examples/codeceptjs/tests/website_test.js" time="0.558" failures="2">
    <testcase name="Basic Website Testing: Visit homepage and verify content" time="0.100" classname="Visit homepage and verify content">
      <failure message="page.goto: net::ERR_CONNECTION_REFUSED at http://localhost/
Call log:
[2m  - navigating to &quot;http://localhost/&quot;, waiting until &quot;load&quot;[22m
" type="Error"><![CDATA[page.goto: net::ERR_CONNECTION_REFUSED at http://localhost/
Call log:
[2m  - navigating to "http://localhost/", waiting until "load"[22m

    at Playwright.amOnPage (node_modules/codeceptjs/lib/helper/Playwright.js:1110:21)
    at HelperStep.run (node_modules/codeceptjs/lib/step/helper.js:28:49)
    at /Users/ono-max/src/github.com/cloudbees-oss/smart-tests-integration-examples/codeceptjs/node_modules/codeceptjs/lib/step/record.js:45:26]]></failure>
    </testcase>
    <testcase name="Basic Website Testing: Check page structure" time="0.083" classname="Check page structure">
      <failure message="page.goto: net::ERR_CONNECTION_REFUSED at http://localhost/
Call log:
[2m  - navigating to &quot;http://localhost/&quot;, waiting until &quot;load&quot;[22m
" type="Error"><![CDATA[page.goto: net::ERR_CONNECTION_REFUSED at http://localhost/
Call log:
[2m  - navigating to "http://localhost/", waiting until "load"[22m

    at Playwright.amOnPage (node_modules/codeceptjs/lib/helper/Playwright.js:1110:21)
    at HelperStep.run (node_modules/codeceptjs/lib/step/helper.js:28:49)
    at /Users/ono-max/src/github.com/cloudbees-oss/smart-tests-integration-examples/codeceptjs/node_modules/codeceptjs/lib/step/record.js:45:26]]></failure>
    </testcase>
  </testsuite>
  <testsuite name="Form Testing" timestamp="2025-10-27T00:42:58" tests="1" file="/Users/ono-max/src/github.com/cloudbees-oss/smart-tests-integration-examples/codeceptjs/tests/form_test.js" time="2.049" failures="0">
    <testcase name="Form Testing: Test form interaction" time="1.986" classname="Test form interaction">
    </testcase>
  </testsuite>
</testsuites>

Sample output

$ echo "test/example_test.js\ntest/other_test.js" | launchable subset --target 100% --test-suite foo codeceptjs  
500 Server Error: Failed to run inference for url: http://localhost:8080/intake/organizations/launchableinc/workspaces/mothership/subset
Warning: the service failed to subset. Falling back to running all tests
{"tests": ["test/example_test.js", "test/other_test.js"]}

$ echo "test/example_test.js\ntest/other_test.js" | /Users/ono-max/.local/share/virtualenvs/cli-tPknK2Me/bin/launchable subset --target 100% --test-suite foo codeceptjs         
{"tests": ["test/other_test.js", "test/example_test.js"]}
Your model is currently in training
Launchable created subset 106 for build 215 (test session 293) in workspace launchableinc/mothership

|           |   Candidates |   Estimated duration (%) |   Estimated duration (min) |
|-----------|--------------|--------------------------|----------------------------|
| Subset    |            2 |                   100.00 |                       0.00 |
| Remainder |            0 |                     0.00 |                       0.00 |
|           |              |                          |                            |
| Total     |            2 |                   100.00 |                       0.00 |

Run `launchable inspect subset --subset-id 106` to view full subset details

$ launchable record tests --allow-test-before-build codeceptjs codeceptjs-result.xml
Launchable recorded tests for build 215 (test session 293) to workspace launchableinc/mothership from 1 files:

|   Files found |   Tests found |   Tests passed |   Tests failed |   Total duration (min) |
|---------------|---------------|----------------|----------------|------------------------|
|             1 |             4 |              4 |              0 |                   0.01 |

Visit https://app.launchableinc.com/organizations/launchableinc/workspaces/mothership/test-sessions/293 to view uploaded test results (or run `launchable inspect tests --test-session-id 293`)

@Konboi
Copy link
Contributor

Konboi commented Oct 24, 2025

Can you prepare sample CodeceptJS project to https://github.com/cloudbees-oss/smart-tests-integration-examples and use actual test reports for test??

I'm concerned about whether we can properly map the subset paths from the report file.

@ono-max ono-max marked this pull request as ready for review October 27, 2025 03:29
@ono-max ono-max requested review from Konboi and gayanW October 27, 2025 03:52
@ono-max
Copy link
Contributor Author

ono-max commented Oct 27, 2025

@gayanW @Konboi

Sorry, let me merge this PR since this is an urgent request from the customer. If you have feedback, I'll address in another PR.

@ono-max ono-max merged commit 768f05b into v1 Oct 27, 2025
13 checks passed
@ono-max ono-max deleted the codeceptjs branch October 27, 2025 06:04
@github-actions github-actions bot mentioned this pull request Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants