lundi 26 octobre 2020

tSQLt testing isnt working while my teachers is

For school we are working on tests for a project. The test my teacher gave me works with no problem:

EXEC tSQLt.NewTestClass 'testMaxPresidents1';
GO

CREATE PROCEDURE [testMaxPresidents1].[test die controleert dat een eerste werknemer van type president opgenomen kan worden]
AS
BEGIN
  EXEC tSQLt.Fail 'TODO:Implement this test.'  
END;

GO

EXEC  tSQLt.[Run] 'testMaxPresidents1.test die controleert dat een eerste werknemer van type president opgenomen kan worden';

It gives the result:

(0 rows affected)
[testMaxPresidents1].[test die controleert dat een eerste werknemer van type president opgenomen kan worden] failed: (Failure) TODO:Implement this test.
 
+----------------------+
|Test Execution Summary|
+----------------------+
 
|No|Test Case Name                                                                                              |Dur(ms)|Result |
+--+------------------------------------------------------------------------------------------------------------+-------+-------+
|1 |[testMaxPresidents1].[test die controleert dat een eerste werknemer van type president opgenomen kan worden]|      6|Failure|

But when I use the same template it doesn't work.


EXEC tSQLt.NewTestClass 'testMaxPresidents1';
GO

CREATE PROCEDURE [testMaxPresidents1].[bla bla bla]
AS
BEGIN
  EXEC tSQLt.Fail 'TODO:Implement this test.'  
END;

GO

EXEC  tSQLt.[Run] 'testMaxPresidents1.bla bla bla';
(1 row affected)
 
+----------------------+
|Test Execution Summary|
+----------------------+
 
|No|Test Case Name|Dur(ms)|Result|
+--+--------------+-------+------+
-----------------------------------------------------------------------------
Test Case Summary: 0 test case(s) executed, 0 succeeded, 0 failed, 0 errored.

No matter what I try, I can't get it to work and I am not able to get a hold of my teacher.

I run them both in the same database.

Aucun commentaire:

Enregistrer un commentaire