Ex 02 - Task 2.5 Runnable Test

Benutzeravatar
jasonchristian
Neuling
Neuling
Beiträge: 7
Registriert: 7. Nov 2016 13:39

Ex 02 - Task 2.5 Runnable Test

Beitrag von jasonchristian »

Write at least 4 different tests that use a combination of the previously implemented testing features and make sure that those can be run using sbt run.
This means that I need to write at least 4 different objects that extends App, correct?
(Because sbt run will execute main methods on src folder, not the tests on test folder)

ManuelWeiel
Mausschubser
Mausschubser
Beiträge: 72
Registriert: 7. Okt 2014 11:38

Re: Ex 02 - Task 2.5 Runnable Test

Beitrag von ManuelWeiel »

Yes. That's correct. But as PerfSpec already extends App, you will only need to extend any PerfSpec variant (like MemoryEvaluation).

buzzy
Neuling
Neuling
Beiträge: 6
Registriert: 15. Mai 2012 17:59

Re: Ex 02 - Task 2.5 Runnable Test

Beitrag von buzzy »

Hi, so as far as I understand, we have to write the tests in src/main/scala/ex02 (because of sbt run)? But I somehow struggle to get the scalatest framework to run outside of the test folder (import org.scalatest.FlatSpec) . Could someone give me a slight hint to the right direction?

ManuelWeiel
Mausschubser
Mausschubser
Beiträge: 72
Registriert: 7. Okt 2014 11:38

Re: Ex 02 - Task 2.5 Runnable Test

Beitrag von ManuelWeiel »

No. Test is somewhat overloaded in the current task.
Runnable test (in task 2.5) means a program that uses your own performance measurement framework.

Test that use Scalatest and actually test your framework should reside inside the test subfolder and be runnable with sbt test (task 2.6)!

buzzy
Neuling
Neuling
Beiträge: 6
Registriert: 15. Mai 2012 17:59

Re: Ex 02 - Task 2.5 Runnable Test

Beitrag von buzzy »

ManuelWeiel hat geschrieben:No. Test is somewhat overloaded in the current task.
Runnable test (in task 2.5) means a program that uses your own performance measurement framework.

Test that use Scalatest and actually test your framework should reside inside the test subfolder and be runnable with sbt test (task 2.6)!
I understand, thanks for clarification.

sbechtel
Mausschubser
Mausschubser
Beiträge: 56
Registriert: 17. Apr 2013 19:13

Re: Ex 02 - Task 2.5 Runnable Test

Beitrag von sbechtel »

The purpose of this task is not clear to me. Just writing some test objects with some combination of traits and a dummy call to measure are not that enlightening. In fact this only shows that objects with some combinations of the stackable traits are runable. To really use the framework one would need to use the generated data which is not the case and to show what is possible and how things work is done in the test cases... Could you please motivate the task a bit?

Best, Sebastian

ManuelWeiel
Mausschubser
Mausschubser
Beiträge: 72
Registriert: 7. Okt 2014 11:38

Re: Ex 02 - Task 2.5 Runnable Test

Beitrag von ManuelWeiel »

sbechtel hat geschrieben:The purpose of this task is not clear to me. Just writing some test objects with some combination of traits and a dummy call to measure are not that enlightening. In fact this only shows that objects with some combinations of the stackable traits are runable. To really use the framework one would need to use the generated data which is not the case and to show what is possible and how things work is done in the test cases... Could you please motivate the task a bit?

Best, Sebastian
I am not sure, what I am supposed to motivate, but I will do my best :)

This task actually is supposed to make you actually use your framework. Writing programs that actually tax the measure method in a memory or a time consuming way, like the example which we gave you. This example allocates a large array, so the value that is serialised for a MemoryEvaluation should obviously be in the right ballpark.
Also this should make it easier to answer the last question, as you can easily explore what impacts the mixin order has to the test results.

Antworten

Zurück zu „Archiv“