@@ -66,6 +66,7 @@ public static InputBuilder input() {
6666 * @return A new InputBuilder instance
6767 */
6868 public static InputBuilder builder () {
69+ logger .debug ("JPWISE_DEBUG: JPWise.builder() entered." );
6970 return new InputBuilder ();
7071 }
7172
@@ -255,15 +256,33 @@ public static CombinationTable generateCombinatorial(
255256 private static CombinationTable executeGeneration (
256257 TestInput input , GenerationAlgorithm algorithm ) {
257258 logger .info (
258- "Executing generation with algorithm : {} for TestInput with {} parameters. NWise/Limit : {}" ,
259+ "JPWise.executeGeneration: Entered. Algorithm : {}, TestInput: {}" ,
259260 algorithm .getClass ().getSimpleName (),
260- input .getTestParameters ().size ());
261+ input );
262+ try {
263+ logger .debug (
264+ "JPWise.executeGeneration: Accessing parameters from input. Parameter count: {}" ,
265+ input .getTestParameters () != null
266+ ? input .getTestParameters ().size ()
267+ : "null TestParameters list" );
268+ } catch (Exception e ) {
269+ logger .error ("JPWise.executeGeneration: Exception while accessing input parameters" , e );
270+ throw e ; // Rethrow to see original failure cause
271+ }
272+
273+ TestGenerator generator ;
274+ try {
275+ logger .debug ("JPWise.executeGeneration: Creating TestGenerator for input: {}" , input );
276+ generator = new TestGenerator (input );
277+ logger .debug ("JPWise.executeGeneration: TestGenerator created successfully." );
278+ } catch (Exception e ) {
279+ logger .error ("JPWise.executeGeneration: Exception during TestGenerator instantiation" , e );
280+ throw e ; // Rethrow
281+ }
261282
262- // Create the generator and run the algorithm.
263- // The nWiseOrLimit is now handled by the algorithm's constructor if needed.
264- TestGenerator generator = new TestGenerator (input );
265283 logger .debug (
266- "JPWise.executeGeneration: TestGenerator created. Calling TestGenerator.generate()..." );
284+ "JPWise.executeGeneration: TestGenerator created. Calling TestGenerator.generate() with algorithm: {}..." ,
285+ algorithm .getClass ().getSimpleName ());
267286 CombinationTable result = generator .generate (algorithm );
268287 logger .debug (
269288 "JPWise.executeGeneration: TestGenerator.generate() returned. Result size: {}" ,
@@ -277,7 +296,10 @@ public static class InputBuilder {
277296 private final TestInput testInput ;
278297
279298 private InputBuilder () {
299+ LOGGER .debug ("JPWISE_DEBUG: InputBuilder constructor entered." );
300+ LOGGER .debug ("InputBuilder instance created." );
280301 this .testInput = new TestInput ();
302+ LOGGER .debug ("JPWISE_DEBUG: InputBuilder constructor exiting." );
281303 }
282304
283305 /**
@@ -374,8 +396,21 @@ public TestInput build() {
374396 * @return A table of generated test combinations
375397 */
376398 public CombinationTable generatePairwise () {
377- LOGGER .info ("InputBuilder.generatePairwise() called. Using PairwiseAlgorithm by default." );
378- return JPWise .executeGeneration (testInput , new PairwiseAlgorithm ());
399+ LOGGER .info ("InputBuilder.generatePairwise() called." );
400+ LOGGER .debug ("InputBuilder.generatePairwise(): Current testInput: {}" , testInput );
401+ LOGGER .debug ("InputBuilder.generatePairwise(): About to instantiate PairwiseAlgorithm." );
402+ PairwiseAlgorithm algo ;
403+ try {
404+ algo = new PairwiseAlgorithm ();
405+ LOGGER .debug (
406+ "InputBuilder.generatePairwise(): PairwiseAlgorithm instantiated successfully." );
407+ } catch (Throwable t ) { // Catch Throwable to see Errors too
408+ LOGGER .error (
409+ "InputBuilder.generatePairwise(): CRITICAL - Error during PairwiseAlgorithm instantiation" ,
410+ t );
411+ throw t ; // Rethrow
412+ }
413+ return JPWise .executeGeneration (testInput , algo );
379414 }
380415
381416 /**
0 commit comments