Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 489215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:47:09+00:00 2026-05-13T01:47:09+00:00

Both Junit and TestNG provide mechanisms for iterating over a collection of input parameters

  • 0

Both Junit and TestNG provide mechanisms for iterating over a collection of input parameters and running your tests against them. In Junit this is supported via the Parameterized annotation, while TestNG uses @DataProvider.

How can you write data-driven tests using the test-is library? I tried using for list comprehension to iterate over an input parameter collection, but because deftest is a macro it’s expecting is clauses.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T01:47:10+00:00Added an answer on May 13, 2026 at 1:47 am

    From reading the article on parameterized tests in Junit it seems that once you get past the poiler plate the cool part of parameterization is that it lets you type this:

          return Arrays.asList(new Object[][] {
                { 2, true },
                { 6, false },
                { 19, true },
                { 22, false }
    

    and easily define four tests.

    in test-is the equivalent (no boiler-plate code required) macro is are

    (are [n prime?] (= prime? (is-prime n))  
         3 true
         8 false)
    

    If you want to give your inputs as a map then you could run something like:

    (dorun (map #(is (= %2 (is-prime %1)) 
                { 3 true, 8 false}))
    

    though the are macro will produce more easily read output.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am attempting to run some automated tests in Eclipse using Java (running them
We have migrated to both JUnit 4 and ant 1.7 The tests runs fine
I try to run JUNIT test with eclipse and ANT they both are complainen
In a maven project I have some junit tests where I need to refer
I'd like to speed up junit tests and I think about using forkMode=once .
My Ant build includes a junit task that runs some tests. In order for
I'm using JUnit 4 (junit-4.8.2.jar) to run tests on my Java project and am
I'm currently running Hamcrest 1.3RC on top of JUnit 4 on top of Eclipse
I'm experiencing different behavior when running some integration tests via IntelliJ IDEA 10 and
I compile my programm against javaee-api. But for Junit testing I must use a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.