Performance indicators for different levels of managementsree431
performance management system is now inevitable in every organisations. introducing performance management in an organisation is essential. Role played by different levels of managers in its effective execution is described in the slides.
This presentation explores the definition of collaboration in the classroom, provides some brief history of composition (and related) theories that support collaboration, and looks at some of the benefits of having students collaborate, whether in small classroom exercises or on larger projects. The majority of the presentation focuses on some practical ways to get students writing together in the classroom, including a model for scaffolding and modeling the process before leaving students to alternately write both collaborative and independently. The presentation concludes with some additional examples of collaborative writing exercises for the classroom and by sharing some online resources for team assignments and online collaboration.
10. テストコード用DSL
● Matchersをミックスインすることで利用できる多彩な等価演算子/Assert
○ Array(1, 2) == Array(1, 2)はfalse
○ Array(1, 2) should equal(Array(1, 2))はtrue
○ “hoogge” should startWith regex (“h(o*)”)
○
○ val a = 1; a should be < 2; a should be >= 0
○
○ val file = new File(“./hoge.txt”); file should be a ‘file
○ val file = new File(“./dir”); file should be a ‘directory
○ ...
12. タグの付け方 - FlatSpec
"This browser" must "is able to hold 100 or more tabs" taggedAs(Slow) in {
(1 to 100).foreach.browser.openNewTab
}
it must "download patches over HTTP correctly" taggedAs(Slow, Network) in {
val file = browser.download(“http://…”)
file.md5sum should equal “.....”
}
15. loan fixtureのコード例1
object TypicalData { def establish: DataType = ??? }
class Example extends FlatSpec {
def withTypicalData(testScenario: DataType => Any): Unit = {
val data = TypicalData.establish
testScenario(data)
}
}
16. loan fixtureのコード例2
“The data” should “contain lines, all of which start with ‘hoge’” in withTypicalData {
data =>
data.lines.foreach(_ should startWith regex “hoge.*”)
}
18. withFixtureのコード例1
trait Example1 extends FlatSpec {
override def withFixture(test: NoArgTest) = {
setupForExample1
super.withFixture(test) match { // superで親のwithFixtureを呼ぶ=スタック呼出!
case failed: Failed => failed
case other => other
}
19. withFixtureのコード例2
trait Example2 extends FlatSpec {
override def withFixture(test: NoArgTest) = {
setupForExample2
super.withFixture(test) match {
case failed: Failed => failed
case other => other
}
20. withFixtureのコード例3(完結)
class Example extends Example1 with Example2 with {
override def withFixture(test: NoArgTest) = {
super.withFixture(test) match {...}
}
“All stacked fixtures” should “be called!” in { … }
}
21. withFixture + loan-fixture(OneArgTest)
● 『withFixtureをスタックさせつつ、さらに定型的なテストデータをテストケースにぶち
込みたいゾ』という欲求に応える
def withFixture(test: OneArgTest) = {
val fixture = ...
withFixture(test.toNoArgTest(fixture))
}
“This test” should “succeeds” in { fixture => … }
29. メッセージ検証
val actorRef = TestActorRef(new OneActor)
val answer = actorRef ? PutNumber99
val Success(result: Int) = answer.value.get
result should be (99)