How to use Map.shouldBeEmpty method of io.kotest.matchers.maps.matchers class

Best Kotest code snippet using io.kotest.matchers.maps.matchers.Map.shouldBeEmpty

BrokerCallServiceIntegrationTest.kt

Source:BrokerCallServiceIntegrationTest.kt Github

copy

Full Screen

1package de.hennihaus.services.callservices2import de.hennihaus.configurations.BrokerConfiguration.ACTIVE_MQ_HEADER_AUTHORIZATION3import de.hennihaus.configurations.BrokerConfiguration.ACTIVE_MQ_HEADER_ORIGIN4import de.hennihaus.configurations.BrokerConfiguration.ACTIVE_MQ_HOST5import de.hennihaus.configurations.BrokerConfiguration.ACTIVE_MQ_PORT6import de.hennihaus.configurations.BrokerConfiguration.ACTIVE_MQ_PROTOCOL7import de.hennihaus.configurations.BrokerConfiguration.ACTIVE_MQ_RETRIES8import de.hennihaus.configurations.BrokerConfiguration.brokerModule9import de.hennihaus.containers.BrokerContainer10import de.hennihaus.models.generated.GetQueuesResponse11import de.hennihaus.models.generated.GetTopicsResponse12import de.hennihaus.models.generated.Queue13import de.hennihaus.models.generated.Topic14import de.hennihaus.objectmothers.BrokerContainerObjectMother.OBJECT_NAME_DEFAULT_PREFIX15import de.hennihaus.objectmothers.BrokerContainerObjectMother.QUEUE_OBJECT_NAME_SUFFIX16import de.hennihaus.objectmothers.BrokerContainerObjectMother.TOPIC_OBJECT_NAME_SUFFIX17import de.hennihaus.objectmothers.BrokerContainerObjectMother.getTestJobs18import de.hennihaus.objectmothers.BrokerContainerObjectMother.getTestQueues19import de.hennihaus.objectmothers.BrokerContainerObjectMother.getTestTopics20import de.hennihaus.objectmothers.BrokerObjectMother.JMS_BANK_A_QUEUE21import de.hennihaus.plugins.BrokerException22import de.hennihaus.plugins.ErrorMessage.BROKER_EXCEPTION_DEFAULT_MESSAGE23import de.hennihaus.plugins.initKoin24import de.hennihaus.services.BrokerServiceImpl.Companion.DESTINATION_NAME_DELIMITER25import de.hennihaus.services.BrokerServiceImpl.Companion.DESTINATION_TYPE_DELIMITER26import io.kotest.assertions.ktor.client.shouldHaveStatus27import io.kotest.assertions.throwables.shouldThrow28import io.kotest.matchers.collections.shouldBeEmpty29import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder30import io.kotest.matchers.collections.shouldHaveSize31import io.kotest.matchers.collections.shouldNotBeEmpty32import io.kotest.matchers.collections.shouldNotContain33import io.kotest.matchers.maps.shouldNotBeEmpty34import io.kotest.matchers.nulls.shouldNotBeNull35import io.kotest.matchers.should36import io.kotest.matchers.shouldBe37import io.kotest.matchers.shouldNotBe38import io.kotest.matchers.string.shouldContain39import io.kotest.matchers.types.beInstanceOf40import io.ktor.client.statement.HttpResponse41import io.ktor.client.statement.bodyAsText42import io.ktor.http.HttpStatusCode43import kotlinx.coroutines.runBlocking44import org.junit.jupiter.api.AfterAll45import org.junit.jupiter.api.BeforeEach46import org.junit.jupiter.api.Nested47import org.junit.jupiter.api.Test48import org.junit.jupiter.api.TestInstance49import org.junit.jupiter.api.extension.RegisterExtension50import org.koin.core.context.stopKoin51import org.koin.ksp.generated.defaultModule52import org.koin.test.KoinTest53import org.koin.test.inject54import org.koin.test.junit5.KoinTestExtension55@TestInstance(TestInstance.Lifecycle.PER_CLASS)56class BrokerCallServiceIntegrationTest : KoinTest {57 private val brokerContainer = BrokerContainer.INSTANCE58 private val classUnderTest: BrokerCallService by inject()59 @JvmField60 @RegisterExtension61 @Suppress("unused")62 val koinTestInstance = KoinTestExtension.create {63 initKoin(64 properties = mapOf(65 ACTIVE_MQ_PROTOCOL to BrokerContainer.ACTIVE_MQ_PROTOCOL.name,66 ACTIVE_MQ_HOST to brokerContainer.host,67 ACTIVE_MQ_PORT to brokerContainer.firstMappedPort.toString(),68 ACTIVE_MQ_RETRIES to BrokerContainer.ACTIVE_MQ_RETRIES.toString(),69 ACTIVE_MQ_HEADER_AUTHORIZATION to BrokerContainer.ACTIVE_MQ_AUTHORIZATION_HEADER,70 ACTIVE_MQ_HEADER_ORIGIN to BrokerContainer.ACTIVE_MQ_ORIGIN_HEADER71 ),72 modules = listOf(defaultModule, brokerModule)73 )74 }75 @BeforeEach76 fun init() = BrokerContainer.resetState()77 @AfterAll78 fun cleanUp() = stopKoin()79 @Nested80 inner class GetAllQueues {81 @Test82 fun `should return 200 and a queue list containing correct objectName`() = runBlocking<Unit> {83 BrokerContainer.addTestData(queues = getTestQueues())84 val result: GetQueuesResponse = classUnderTest.getAllQueues()85 result.shouldNotBeNull()86 result.status shouldBe HttpStatusCode.OK.value87 result.value shouldHaveSize getTestQueues().size88 result.value shouldContainExactlyInAnyOrder getTestQueues().map {89 Queue(90 objectName = """91 $OBJECT_NAME_DEFAULT_PREFIX92 $DESTINATION_NAME_DELIMITER93 $it94 $DESTINATION_TYPE_DELIMITER95 $QUEUE_OBJECT_NAME_SUFFIX96 """.trimIndent().replace("\n", "")97 )98 }99 }100 @Test101 fun `should return 200 and an empty list when no queues available`() = runBlocking<Unit> {102 BrokerContainer.addTestData(queues = emptyList())103 val result: GetQueuesResponse = classUnderTest.getAllQueues()104 result.shouldNotBeNull()105 result.status shouldBe HttpStatusCode.OK.value106 result.value.shouldBeEmpty()107 }108 }109 @Nested110 inner class GetAllTopics {111 @Test112 fun `should return 200 and a topic list containing correct objectName`() = runBlocking<Unit> {113 BrokerContainer.addTestData(topics = getTestTopics())114 val result: GetTopicsResponse = classUnderTest.getAllTopics()115 result.shouldNotBeNull()116 result.status shouldBe HttpStatusCode.OK.value117 result.value shouldHaveSize getTestTopics().size118 result.value shouldContainExactlyInAnyOrder getTestTopics().map {119 Topic(120 objectName = """121 $OBJECT_NAME_DEFAULT_PREFIX122 $DESTINATION_NAME_DELIMITER123 $it124 $DESTINATION_TYPE_DELIMITER125 $TOPIC_OBJECT_NAME_SUFFIX126 """.trimIndent().replace("\n", "")127 )128 }129 }130 @Test131 fun `should return 200 and an empty list when no topics available`() = runBlocking<Unit> {132 BrokerContainer.addTestData(topics = emptyList())133 val result: GetTopicsResponse = classUnderTest.getAllTopics()134 result.shouldNotBeNull()135 result.status shouldBe HttpStatusCode.OK.value136 result.value.shouldBeEmpty()137 }138 }139 @Nested140 inner class DeleteAllJobs {141 @Test142 fun `should return 200 and delete all open jobs in broker`() = runBlocking {143 BrokerContainer.addTestData(jobs = getTestJobs())144 BrokerContainer.getTestJobs().value.shouldNotBeEmpty()145 val response: HttpResponse = classUnderTest.deleteAllJobs()146 response shouldHaveStatus HttpStatusCode.OK147 response.bodyAsText() shouldContain HTTP_STATUS_OK148 BrokerContainer.getTestJobs().value shouldBe emptyMap()149 }150 @Test151 fun `should return 200 and not throw an exception when no jobs is in broker`() = runBlocking {152 BrokerContainer.addTestData(jobs = emptyMap())153 val response: HttpResponse = classUnderTest.deleteAllJobs()154 response shouldHaveStatus HttpStatusCode.OK155 response.bodyAsText() shouldContain HTTP_STATUS_OK156 BrokerContainer.getTestJobs().value shouldBe emptyMap()157 }158 }159 @Nested160 inner class DeleteQueueByName {161 @Test162 fun `should delete a queue by name`() = runBlocking<Unit> {163 BrokerContainer.addTestData(queues = listOf(JMS_BANK_A_QUEUE))164 BrokerContainer.getTestQueues().value.shouldNotBeEmpty()165 val response: HttpResponse = classUnderTest.deleteQueueByName(name = JMS_BANK_A_QUEUE)166 response shouldHaveStatus HttpStatusCode.OK167 response.bodyAsText() shouldContain HTTP_STATUS_OK168 BrokerContainer.getTestQueues().value.shouldBeEmpty()169 }170 @Test171 fun `should return 200 and not throw an exception when queue was not found`() = runBlocking<Unit> {172 val name = "unknownQueue"173 val response: HttpResponse = classUnderTest.deleteQueueByName(name = name)174 response shouldHaveStatus HttpStatusCode.OK175 response.bodyAsText() shouldContain HTTP_STATUS_OK176 BrokerContainer.getTestQueues().value.shouldBeEmpty()177 }178 @Test179 fun `should throw an exception when queue in request is empty`() = runBlocking {180 val name = ""181 val response = shouldThrow<BrokerException> { classUnderTest.deleteQueueByName(name = name) }182 response should beInstanceOf<BrokerException>()183 response.message shouldNotBe BROKER_EXCEPTION_DEFAULT_MESSAGE184 }185 }186 @Nested187 inner class DeleteTopicByName {188 @Test189 fun `should delete a topic by name`() = runBlocking<Unit> {190 BrokerContainer.addTestData(topics = listOf(JMS_BANK_A_QUEUE))191 BrokerContainer.getTestTopics().value.shouldNotBeEmpty()192 val response: HttpResponse = classUnderTest.deleteTopicByName(name = JMS_BANK_A_QUEUE)193 response shouldHaveStatus HttpStatusCode.OK194 response.bodyAsText() shouldContain HTTP_STATUS_OK195 BrokerContainer.getTestTopics().value shouldNotContain Topic(196 objectName = """197 $OBJECT_NAME_DEFAULT_PREFIX198 $DESTINATION_NAME_DELIMITER199 $JMS_BANK_A_QUEUE200 $DESTINATION_TYPE_DELIMITER201 $TOPIC_OBJECT_NAME_SUFFIX202 """.trimIndent().replace("\n", "")203 )204 }205 @Test206 fun `should return 200 and not throw an exception when topic was not found`() = runBlocking<Unit> {207 val name = "unknownTopic"208 val response: HttpResponse = classUnderTest.deleteTopicByName(name = name)209 response shouldHaveStatus HttpStatusCode.OK210 response.bodyAsText() shouldContain HTTP_STATUS_OK211 BrokerContainer.getTestTopics().value.shouldBeEmpty()212 }213 @Test214 fun `should throw an exception when topic in request is empty`() = runBlocking {215 val name = ""216 val response = shouldThrow<BrokerException> { classUnderTest.deleteTopicByName(name = name) }217 response should beInstanceOf<BrokerException>()218 response.message shouldNotBe BROKER_EXCEPTION_DEFAULT_MESSAGE219 }220 }221 companion object {222 const val HTTP_STATUS_OK = """"status":200"""223 }224}...

Full Screen

Full Screen

ReplVarsTest.kt

Source:ReplVarsTest.kt Github

copy

Full Screen

1package org.jetbrains.kotlinx.jupyter.test.repl2import io.kotest.matchers.collections.shouldBeEmpty3import io.kotest.matchers.collections.shouldContain4import io.kotest.matchers.maps.shouldBeEmpty5import io.kotest.matchers.maps.shouldContainValue6import io.kotest.matchers.maps.shouldHaveSize7import io.kotest.matchers.maps.shouldNotBeEmpty8import io.kotest.matchers.shouldBe9import org.jetbrains.kotlinx.jupyter.api.VariableStateImpl10import org.jetbrains.kotlinx.jupyter.test.getStringValue11import org.jetbrains.kotlinx.jupyter.test.getValue12import org.jetbrains.kotlinx.jupyter.test.mapToStringValues13import org.junit.jupiter.api.Test14class ReplVarsTest : AbstractSingleReplTest() {15 override val repl = makeSimpleRepl()16 private val varState get() = repl.notebook.variablesState17 private val cellVars get() = repl.notebook.cellVariables18 private fun cellVarsAt(i: Int) = cellVars[i]!!19 private val firstCellVars get() = cellVarsAt(0)20 private val secondCellVars get() = cellVarsAt(1)21 @Test22 fun testVarsStateConsistency() {23 varState.shouldBeEmpty()24 eval(25 """26 val x = 1 27 val y = 028 val z = 4729 """.trimIndent()30 )31 varState.mapToStringValues() shouldBe mutableMapOf(32 "x" to "1",33 "y" to "0",34 "z" to "47"35 )36 varState.getStringValue("x") shouldBe "1"37 varState.getStringValue("y") shouldBe "0"38 varState.getValue("z") shouldBe 4739 (varState["z"] as VariableStateImpl).update()40 varState.getValue("z") shouldBe 4741 }42 @Test43 fun testVarsEmptyState() {44 val res = eval("3+2")45 val strState = varState.mapToStringValues()46 varState.shouldBeEmpty()47 res.metadata.evaluatedVariablesState shouldBe strState48 }49 @Test50 fun testVarsCapture() {51 eval(52 """53 val x = 1 54 val y = "abc"55 val z = x56 """.trimIndent()57 )58 varState.mapToStringValues() shouldBe mapOf("x" to "1", "y" to "abc", "z" to "1")59 varState.getValue("x") shouldBe 160 varState.getStringValue("y") shouldBe "abc"61 varState.getStringValue("z") shouldBe "1"62 }63 @Test64 fun testVarsCaptureSeparateCells() {65 eval(66 """67 val x = 1 68 val y = "abc"69 val z = x70 """.trimIndent()71 )72 varState.shouldNotBeEmpty()73 eval(74 """75 val x = "abc" 76 var y = 12377 val z = x78 """.trimIndent(),79 jupyterId = 180 )81 varState shouldHaveSize 382 varState.getStringValue("x") shouldBe "abc"83 varState.getValue("y") shouldBe 12384 varState.getStringValue("z") shouldBe "abc"85 eval(86 """87 val x = 1024 88 y += 12389 """.trimIndent(),90 jupyterId = 291 )92 varState shouldHaveSize 393 varState.getStringValue("x") shouldBe "1024"94 varState.getStringValue("y") shouldBe "${123 * 2}"95 varState.getValue("z") shouldBe "abc"96 }97 @Test98 fun testPrivateVarsCapture() {99 eval(100 """101 private val x = 1 102 private val y = "abc"103 val z = x104 """.trimIndent()105 )106 varState.mapToStringValues() shouldBe mapOf("x" to "1", "y" to "abc", "z" to "1")107 varState.getValue("x") shouldBe 1108 }109 @Test110 fun testPrivateVarsCaptureSeparateCells() {111 eval(112 """113 private val x = 1 114 private val y = "abc"115 private val z = x116 """.trimIndent()117 )118 varState.shouldNotBeEmpty()119 eval(120 """121 private val x = "abc" 122 var y = 123123 private val z = x124 """.trimIndent(),125 jupyterId = 1126 )127 varState shouldHaveSize 3128 varState.getStringValue("x") shouldBe "abc"129 varState.getValue("y") shouldBe 123130 varState.getStringValue("z") shouldBe "abc"131 eval(132 """133 private val x = 1024 134 y += x135 """.trimIndent(),136 jupyterId = 2137 )138 varState shouldHaveSize 3139 varState.getStringValue("x") shouldBe "1024"140 varState.getValue("y") shouldBe 123 + 1024141 varState.getStringValue("z") shouldBe "abc"142 }143 @Test144 fun testVarsUsageConsistency() {145 eval("3+2")146 cellVars shouldHaveSize 1147 cellVars.values.first().shouldBeEmpty()148 }149 @Test150 fun testVarsDefsUsage() {151 eval(152 """153 val x = 1154 val z = "abcd"155 var f = 47156 """.trimIndent()157 )158 cellVars shouldContainValue setOf("z", "f", "x")159 }160 @Test161 fun testVarsDefNRefUsage() {162 eval(163 """164 val x = "abcd"165 var f = 47166 """.trimIndent()167 )168 cellVars.shouldNotBeEmpty()169 eval(170 """171 val z = 1172 f += f173 """.trimIndent()174 )175 cellVars shouldContainValue setOf("z", "f", "x")176 }177 @Test178 fun testPrivateVarsDefNRefUsage() {179 eval(180 """181 val x = 124182 private var f = "abcd"183 """.trimIndent()184 )185 cellVars.shouldNotBeEmpty()186 eval(187 """188 private var z = 1189 z += x190 """.trimIndent()191 )192 cellVars shouldContainValue setOf("z", "f", "x")193 }194 @Test195 fun testSeparateDefsUsage() {196 eval(197 """198 val x = "abcd"199 var f = 47200 """.trimIndent(),201 jupyterId = 1202 )203 firstCellVars shouldContain "x"204 eval(205 """206 val x = 341207 var f = "abcd"208 """.trimIndent(),209 jupyterId = 2210 )211 cellVars.shouldNotBeEmpty()212 firstCellVars.shouldBeEmpty()213 secondCellVars shouldBe setOf("x", "f")214 }215 @Test216 fun testSeparatePrivateDefsUsage() {217 eval(218 """219 private val x = "abcd"220 private var f = 47221 """.trimIndent(),222 jupyterId = 1223 )224 firstCellVars shouldContain "x"225 eval(226 """227 val x = 341228 private var f = "abcd"229 """.trimIndent(),230 jupyterId = 2231 )232 cellVars.shouldNotBeEmpty()233 firstCellVars.shouldBeEmpty()234 secondCellVars shouldBe setOf("x", "f")235 }236 @Test237 fun testRecursiveVarsState() {238 eval(239 """240 val l = mutableListOf<Any>()241 l.add(listOf(l))242 243 val m = mapOf(1 to l)244 245 val z = setOf(1, 2, 4)246 """.trimIndent(),247 jupyterId = 1248 )249 varState.getStringValue("l") shouldBe "ArrayList: [exception thrown: java.lang.StackOverflowError]"250 varState.getStringValue("m") shouldBe "SingletonMap: [exception thrown: java.lang.StackOverflowError]"251 varState.getStringValue("z") shouldBe "[1, 2, 4]"252 }253 @Test254 fun testSeparatePrivateCellsUsage() {255 eval(256 """257 private val x = "abcd"258 var f = 47259 internal val z = 47260 """.trimIndent(),261 jupyterId = 1262 )263 firstCellVars shouldContain "x"264 firstCellVars shouldContain "z"265 eval(266 """267 private val x = 341268 f += x269 protected val z = "abcd"270 """.trimIndent(),271 jupyterId = 2272 )273 cellVars.shouldNotBeEmpty()274 firstCellVars shouldBe setOf("f")275 secondCellVars shouldBe setOf("x", "f", "z")276 }277 @Test278 fun testVariableModification() {279 eval("var x = sqrt(25.0)", jupyterId = 1)280 varState.getStringValue("x") shouldBe "5.0"281 varState.getValue("x") shouldBe 5.0282 eval("x = x * x", jupyterId = 2)283 varState.getStringValue("x") shouldBe "25.0"284 varState.getValue("x") shouldBe 25.0285 }286}...

Full Screen

Full Screen

ListUtilsTests.kt

Source:ListUtilsTests.kt Github

copy

Full Screen

1package com.github.jvmusin.universalconverter2import io.kotest.assertions.throwables.shouldThrow3import io.kotest.core.spec.style.BehaviorSpec4import io.kotest.matchers.collections.shouldBeEmpty5import io.kotest.matchers.maps.shouldBeEmpty6import io.kotest.matchers.maps.shouldContainExactly7import io.kotest.matchers.shouldBe8import com.github.jvmusin.universalconverter.ListUtils.*9class ListUtilsTests : BehaviorSpec({10 Given("mergeLists") {11 When("первый список равен null") {12 Then("бросает IllegalArgumentException") {13 shouldThrow<IllegalArgumentException> {14 mergeLists(null, listOf(1, 2, 3))15 }16 }17 }18 When("второй список равен null") {19 Then("бросает IllegalArgumentException") {20 shouldThrow<IllegalArgumentException> {21 mergeLists(listOf(1, 2, 3), null)22 }23 }24 }25 When("оба списка равны null") {26 Then("бросает IllegalArgumentException") {27 shouldThrow<IllegalArgumentException> {28 mergeLists<Int>(null, null)29 }30 }31 }32 When("оба списка не равны null") {33 Then("сливает как надо") {34 mergeLists(listOf(1, 2), listOf(3, 4, 5)) shouldBe listOf(1, 2, 3, 4, 5)35 }36 }37 When("в списках есть null значения") {38 Then("сливает как надо") {39 mergeLists(listOf(1, null, null, 2), listOf(3, null, 4, 5))40 .shouldBe(listOf(1, null, null, 2, 3, null, 4, 5))41 }42 }43 }44 Given("mapList") {45 When("список равен null") {46 Then("бросает IllegalArgumentException") {47 shouldThrow<IllegalArgumentException> { mapList<Int, Int>(null) { it } }48 }49 }50 When("mapper равен null") {51 Then("бросает IllegalArgumentException") {52 shouldThrow<IllegalArgumentException> { mapList<Int, Int>(listOf(1, 2, 3), null) }53 }54 }55 When("список пуст") {56 Then("возвращает пустой список") {57 mapList(listOf<Int>()) { it }.shouldBeEmpty()58 }59 }60 When("список состоит из 1 элемента") {61 Then("возвращает 1 элемент") {62 mapList(listOf(1)) { it * 2 } shouldBe listOf(2)63 }64 }65 When("список состоит из нескольких элементов") {66 Then("возвращает все элементы") {67 mapList(listOf(1, 2, 3, 5, 2)) { it * 2 } shouldBe listOf(2, 4, 6, 10, 4)68 }69 }70 When("на некоторых элементах списка возвращается null") {71 Then("возвращает список с null значениями") {72 val input = listOf(1, 2, 3, 4, 5)73 val expected = listOf(1, null, 3, null, 5)74 mapList(input) { if (it % 2 == 0) null else it } shouldBe expected75 }76 }77 When("некоторые элементы списка равны null") {78 And("mapper их правильно обрабатывает") {79 Then("возвращает правильный список") {80 mapList(listOf(1, null, 3)) { it ?: -1 } shouldBe listOf(1, -1, 3)81 }82 }83 }84 }85 Given("groupList") {86 When("список равен null") {87 Then("бросает IllegalArgumentException") {88 shouldThrow<IllegalArgumentException> { groupList<Int, Int>(null) { it } }89 }90 }91 When("mapper равен null") {92 Then("бросает IllegalArgumentException") {93 shouldThrow<IllegalArgumentException> { groupList<Int, Int>(listOf(1, 2, 3), null) }94 }95 }96 When("mapper возвращает null") {97 Then("бросает NullPointerException") {98 shouldThrow<NullPointerException> {99 groupList(listOf(1, 2, 3)) { if (it % 2 == 1) it else null }100 }101 }102 }103 When("список пуст") {104 Then("возвращает пустой словарь") {105 groupList(listOf<Int>()) { it }.shouldBeEmpty()106 }107 }108 When("список состоит из 1 элемента") {109 Then("возвращает словарь из 1 элемента") {110 groupList(listOf(5)) { it * 2 } shouldBe mapOf(10 to listOf(5))111 }112 }113 When("все элементы списка дают разные ключи") {114 Then("возвращает словарь со списками по одному элементу") {115 val list = listOf(1, 2, 3)116 val expected = mapOf(117 2 to listOf(1),118 4 to listOf(2),119 6 to listOf(3)120 )121 groupList(list) { it * 2 }.shouldContainExactly(expected)122 }123 }124 When("некоторые элементы списка дают одинаковые ключи") {125 Then("группирует элементы с одинаковыми значениями в один список") {126 val list = listOf(1, 2, 3, 4, 5)127 val expected = mapOf(128 0 to listOf(3),129 1 to listOf(1, 4),130 2 to listOf(2, 5)131 )132 groupList(list) { it % 3 }.shouldContainExactly(expected)133 }134 }135 When("некоторые элементы списка равны null") {136 And("extractKey обрабатывает их нормально") {137 Then("возвращает правильный словарь") {138 val list = listOf(1, 2, null, 3)139 val expected = mapOf(140 0 to listOf(2),141 1 to listOf(1, 3),142 -1 to listOf(null)143 )144 groupList(list) { if (it != null) it % 2 else -1 }.shouldContainExactly(expected)145 }146 }147 }148 }149})...

Full Screen

Full Screen

FailingKotestAsserts.kt

Source:FailingKotestAsserts.kt Github

copy

Full Screen

1package testing.failing2import arrow.core.*3import io.kotest.assertions.arrow.either.shouldBeLeft4import io.kotest.assertions.arrow.either.shouldBeRight5import io.kotest.assertions.arrow.nel.shouldContain6import io.kotest.assertions.arrow.nel.shouldContainNull7import io.kotest.assertions.arrow.option.shouldBeNone8import io.kotest.assertions.arrow.option.shouldBeSome9import io.kotest.assertions.arrow.validation.shouldBeInvalid10import io.kotest.assertions.arrow.validation.shouldBeValid11import io.kotest.assertions.asClue12import io.kotest.assertions.assertSoftly13import io.kotest.assertions.json.*14import io.kotest.assertions.throwables.shouldThrowAny15import io.kotest.assertions.throwables.shouldThrowExactly16import io.kotest.assertions.withClue17import io.kotest.matchers.Matcher18import io.kotest.matchers.MatcherResult19import io.kotest.matchers.booleans.shouldBeFalse20import io.kotest.matchers.booleans.shouldBeTrue21import io.kotest.matchers.collections.shouldBeEmpty22import io.kotest.matchers.collections.shouldBeOneOf23import io.kotest.matchers.collections.shouldBeSameSizeAs24import io.kotest.matchers.collections.shouldBeSorted25import io.kotest.matchers.collections.shouldContain26import io.kotest.matchers.date.shouldBeAfter27import io.kotest.matchers.ints.shouldBeEven28import io.kotest.matchers.ints.shouldBeGreaterThan29import io.kotest.matchers.ints.shouldBeGreaterThanOrEqual30import io.kotest.matchers.ints.shouldBeLessThan31import io.kotest.matchers.ints.shouldBeLessThanOrEqual32import io.kotest.matchers.ints.shouldBeZero33import io.kotest.matchers.maps.shouldBeEmpty34import io.kotest.matchers.maps.shouldContain35import io.kotest.matchers.maps.shouldContainKey36import io.kotest.matchers.maps.shouldContainValue37import io.kotest.matchers.nulls.shouldBeNull38import io.kotest.matchers.should39import io.kotest.matchers.shouldBe40import io.kotest.matchers.shouldNot41import io.kotest.matchers.string.shouldBeBlank42import io.kotest.matchers.string.shouldBeEmpty43import io.kotest.matchers.string.shouldBeUpperCase44import io.kotest.matchers.string.shouldContain45import io.kotest.matchers.string.shouldNotBeBlank46import java.time.LocalDate47import org.junit.jupiter.api.Test48/**49 * Kotest assertions50 *51 * - [Kotest Assertions Documentation](https://kotest.io/assertions/)52 * - [Github](https://github.com/kotest/kotest/)53 */54class FailingKotestAsserts {55 @Test56 fun `General assertions`() {57 assertSoftly {58 "text" shouldBe "txet"59 "hi".shouldBeBlank()60 " ".shouldNotBeBlank()61 "hi".shouldBeEmpty()62 "hi".shouldBeUpperCase()63 "hello".shouldContain("hi")64 false.shouldBeTrue()65 true.shouldBeFalse()66 "not null".shouldBeNull()67 10 shouldBeLessThan 1068 10 shouldBeLessThanOrEqual 969 11 shouldBeGreaterThan 1170 11 shouldBeGreaterThanOrEqual 1271 9.shouldBeEven()72 1.shouldBeZero()73 }74 }75 @Test76 fun `Exception assertions`() {77 assertSoftly {78 shouldThrowExactly<IllegalArgumentException> {79 angryFunction()80 }81 shouldThrowAny {82 "I'm not throwing anything"83 }84 }85 }86 @Test87 fun `Collection assertions`() {88 assertSoftly {89 listOf(1, 2, 3).shouldBeEmpty()90 listOf(1, 2, 3) shouldContain 491 listOf(1, 3, 2).shouldBeSorted()92 listOf(1, 2, 3, 4) shouldBeSameSizeAs listOf(4, 5, 6)93 1 shouldBeOneOf listOf(2, 3)94 mapOf(1 to "one", 2 to "two", 3 to "three").shouldBeEmpty()95 mapOf(1 to "one", 2 to "two", 3 to "three") shouldContainKey 496 mapOf(1 to "one", 2 to "two", 3 to "three") shouldContainValue "five"97 mapOf(1 to "one", 2 to "two", 3 to "three") shouldContain (6 to "six")98 }99 }100 @Test101 fun `Arrow assertions`() {102 assertSoftly {103 val optionNone = none<String>()104 val optionSome = Some("I am something").toOption()105 optionSome.shouldBeNone()106 optionNone.shouldBeSome()107 val rightEither = Either.Right(1)108 val leftEither = Either.Left("ERROR!!")109 leftEither.shouldBeRight()110 leftEither shouldBeRight 1111 rightEither.shouldBeLeft()112 rightEither shouldBeLeft "ERROR!!"113 val nonEmptyList = NonEmptyList.of(1, 2, 3, 4, 5)114 nonEmptyList shouldContain 6115 nonEmptyList.shouldContainNull()116 val valid = Validated.valid()117 val invalid = Validated.invalid()118 invalid.shouldBeValid()119 valid.shouldBeInvalid()120 }121 }122 @Test123 fun `Json assertions`() {124 val jsonString = "{\"test\": \"property\", \"isTest\": true }"125 assertSoftly {126 jsonString shouldMatchJson "{\"test\": \"otherProperty\"}"127 jsonString shouldContainJsonKey "$.anotherTest"128 jsonString shouldNotContainJsonKey "$.test"129 jsonString.shouldContainJsonKeyValue("$.isTest", false)130 }131 }132 @Test133 fun `Custom assertions`() {134 assertSoftly {135 val sentMail = Mail(136 dateCreated = LocalDate.of(2020, 10, 27),137 sent = true, message = "May you have an amazing day"138 )139 val unsentMail = Mail(140 dateCreated = LocalDate.of(2020, 10, 27),141 sent = false, message = "May you have an amazing day"142 )143 // This is possible144 unsentMail.sent should beSent()145 sentMail.sent shouldNot beSent()146 // This is recommended147 unsentMail.shouldBeSent()148 sentMail.shouldNotBeSent()149 }150 }151 @Test152 fun `withClue usage`() {153 val mail = Mail(154 dateCreated = LocalDate.of(2020, 10, 27),155 sent = false, message = "May you have an amazing day"156 )157 withClue("sent field should be true") {158 mail.sent shouldBe true159 }160 mail.asClue {161 it.dateCreated shouldBeAfter LocalDate.of(2020, 10, 26)162 it.sent shouldBe true163 }164 }165 @Test166 fun `asClue usage`() {167 val mail = Mail(168 dateCreated = LocalDate.of(2020, 10, 27),169 sent = false, message = "May you have an amazing day"170 )171 mail.asClue {172 it.dateCreated shouldBeAfter LocalDate.of(2020, 10, 26)173 it.sent shouldBe true174 }175 }176 fun beSent() = object : Matcher<Boolean> {177 override fun test(value: Boolean) = MatcherResult(value, "Mail.sent should be true", "Mail.sent should be false")178 }179 fun Mail.shouldBeSent() = this.sent should beSent()180 fun Mail.shouldNotBeSent() = this.sent shouldNot beSent()181}182data class Mail(val dateCreated: LocalDate, val sent: Boolean, val message: String)183fun angryFunction() {184 throw IllegalStateException("How dare you!")185}...

Full Screen

Full Screen

KotestAsserts.kt

Source:KotestAsserts.kt Github

copy

Full Screen

1package testing.asserts2import arrow.core.*3import io.kotest.assertions.arrow.either.shouldBeLeft4import io.kotest.assertions.arrow.either.shouldBeRight5import io.kotest.assertions.arrow.nel.shouldContain6import io.kotest.assertions.arrow.nel.shouldContainNull7import io.kotest.assertions.arrow.option.shouldBeNone8import io.kotest.assertions.arrow.option.shouldBeSome9import io.kotest.assertions.arrow.validation.shouldBeInvalid10import io.kotest.assertions.arrow.validation.shouldBeValid11import io.kotest.assertions.asClue12import io.kotest.assertions.json.*13import io.kotest.assertions.throwables.shouldThrowAny14import io.kotest.assertions.throwables.shouldThrowExactly15import io.kotest.assertions.withClue16import io.kotest.matchers.Matcher17import io.kotest.matchers.MatcherResult18import io.kotest.matchers.booleans.shouldBeFalse19import io.kotest.matchers.booleans.shouldBeTrue20import io.kotest.matchers.collections.shouldBeEmpty21import io.kotest.matchers.collections.shouldBeOneOf22import io.kotest.matchers.collections.shouldBeSameSizeAs23import io.kotest.matchers.collections.shouldBeSorted24import io.kotest.matchers.collections.shouldContain25import io.kotest.matchers.date.shouldBeAfter26import io.kotest.matchers.ints.shouldBeEven27import io.kotest.matchers.ints.shouldBeGreaterThan28import io.kotest.matchers.ints.shouldBeGreaterThanOrEqual29import io.kotest.matchers.ints.shouldBeLessThan30import io.kotest.matchers.ints.shouldBeLessThanOrEqual31import io.kotest.matchers.ints.shouldBeZero32import io.kotest.matchers.maps.shouldBeEmpty33import io.kotest.matchers.maps.shouldContain34import io.kotest.matchers.maps.shouldContainKey35import io.kotest.matchers.maps.shouldContainValue36import io.kotest.matchers.nulls.shouldBeNull37import io.kotest.matchers.should38import io.kotest.matchers.shouldBe39import io.kotest.matchers.shouldNot40import io.kotest.matchers.string.shouldBeBlank41import io.kotest.matchers.string.shouldBeEmpty42import io.kotest.matchers.string.shouldBeUpperCase43import io.kotest.matchers.string.shouldContain44import io.kotest.matchers.string.shouldNotBeBlank45import java.time.LocalDate46import org.junit.jupiter.api.Test47/**48 * Kotest assertions49 *50 * - [Kotest Assertions Documentation](https://kotest.io/assertions/)51 * - [Github](https://github.com/kotest/kotest/)52 */53class KotestAsserts {54 @Test55 fun `General assertions`() {56 "text" shouldBe "text"57 " ".shouldBeBlank()58 "hi".shouldNotBeBlank()59 "".shouldBeEmpty()60 "HI".shouldBeUpperCase()61 "hello".shouldContain("ll")62 true.shouldBeTrue()63 false.shouldBeFalse()64 null.shouldBeNull()65 10 shouldBeLessThan 1166 10 shouldBeLessThanOrEqual 1067 11 shouldBeGreaterThan 1068 11 shouldBeGreaterThanOrEqual 1169 10.shouldBeEven()70 0.shouldBeZero()71 }72 @Test73 fun `Exception assertions`() {74 shouldThrowExactly<IllegalStateException> {75 angryFunction()76 }77 shouldThrowAny {78 angryFunction()79 }80 }81 @Test82 fun `Collection assertions`() {83 emptyList<Int>().shouldBeEmpty()84 listOf(1, 2, 3) shouldContain 385 listOf(1, 2, 3).shouldBeSorted()86 listOf(1, 2, 3) shouldBeSameSizeAs listOf(4, 5, 6)87 1 shouldBeOneOf listOf(1, 2, 3)88 emptyMap<Int, String>().shouldBeEmpty()89 mapOf(1 to "one", 2 to "two", 3 to "three") shouldContainKey 190 mapOf(1 to "one", 2 to "two", 3 to "three") shouldContainValue "two"91 mapOf(1 to "one", 2 to "two", 3 to "three") shouldContain (3 to "three")92 }93 @Test94 fun `Arrow assertions`() {95 val optionNone = none<String>()96 val optionSome = Some("I am something").toOption()97 optionNone.shouldBeNone()98 optionSome.shouldBeSome()99 val rightEither = Either.Right(1)100 val leftEither = Either.Left("ERROR!!")101 rightEither.shouldBeRight()102 rightEither shouldBeRight 1103 leftEither.shouldBeLeft()104 leftEither shouldBeLeft "ERROR!!"105 val nonEmptyList = NonEmptyList.of(1, 2, 3, 4, 5, null)106 nonEmptyList shouldContain 1107 nonEmptyList.shouldContainNull()108 val valid = Validated.valid()109 val invalid = Validated.invalid()110 valid.shouldBeValid()111 invalid.shouldBeInvalid()112 }113 @Test114 fun `Json assertions`() {115 val jsonString = "{\"test\": \"property\", \"isTest\": true }"116 jsonString shouldMatchJson jsonString117 jsonString shouldContainJsonKey "$.test"118 jsonString shouldNotContainJsonKey "$.notTest"119 jsonString.shouldContainJsonKeyValue("$.isTest", true)120 }121 @Test122 fun `Custom assertions`() {123 val sentMail = Mail(124 dateCreated = LocalDate.of(2020, 10, 27),125 sent = true, message = "May you have an amazing day"126 )127 val unsentMail = Mail(128 dateCreated = LocalDate.of(2020, 10, 27),129 sent = false, message = "May you have an amazing day"130 )131 // This is possible132 sentMail.sent should beSent()133 unsentMail.sent shouldNot beSent()134 // This is recommended135 sentMail.shouldBeSent()136 unsentMail.shouldNotBeSent()137 }138 @Test139 fun `withClue usage`() {140 val mail = Mail(141 dateCreated = LocalDate.of(2020, 10, 27),142 sent = false, message = "May you have an amazing day"143 )144 withClue("sent field should be false") {145 mail.sent shouldBe false146 }147 mail.asClue {148 it.dateCreated shouldBeAfter LocalDate.of(2020, 10, 26)149 it.sent shouldBe false150 }151 }152 @Test153 fun `asClue usage`() {154 val mail = Mail(155 dateCreated = LocalDate.of(2020, 10, 27),156 sent = false, message = "May you have an amazing day"157 )158 mail.asClue {159 it.dateCreated shouldBeAfter LocalDate.of(2020, 10, 26)160 it.sent shouldBe false161 }162 }163 fun beSent() = object : Matcher<Boolean> {164 override fun test(value: Boolean) = MatcherResult(value, "Mail.sent should be true", "Mail.sent should be false")165 }166 fun Mail.shouldBeSent() = this.sent should beSent()167 fun Mail.shouldNotBeSent() = this.sent shouldNot beSent()168}169data class Mail(val dateCreated: LocalDate, val sent: Boolean, val message: String)170fun angryFunction() {171 throw IllegalStateException("How dare you!")172}...

Full Screen

Full Screen

BeverageWithoutIdValidatorTest.kt

Source:BeverageWithoutIdValidatorTest.kt Github

copy

Full Screen

1package io.teapot.usecase.beverages.validator2import io.kotest.core.spec.style.DescribeSpec3import io.kotest.data.row4import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder5import io.kotest.matchers.maps.shouldBeEmpty6import io.kotest.matchers.maps.shouldContainKey7import io.kotest.matchers.maps.shouldHaveSize8import io.kotest.matchers.maps.shouldNotBeEmpty9import io.teapot.domain.entity.BeverageWithoutId10import io.teapot.usecase.validation.ValidationErrors11class BeverageWithoutIdValidatorTest : DescribeSpec({12 describe("validate") {13 val validName = "Valid Beverage"14 describe("when BeverageWithoutId is valid") {15 it("returns empty validation errors") {16 val validBeverageWithoutId = BeverageWithoutId(validName)17 val validationErrors: ValidationErrors = BeverageWithoutIdValidator.validate(validBeverageWithoutId)18 validationErrors.shouldBeEmpty()19 }20 }21 describe("when BeverageWithoutId is invalid") {22 val emptyString = ""23 val blankString = " "24 val oversizeString = "a".repeat(256)25 val validString = "valid-string"26 val blankMessage = "must not be blank"27 val oversizeMessage = "size must be between 1 and 255"28 listOf(29 row(30 "when name is empty",31 "name",32 BeverageWithoutId(emptyString),33 listOf(blankMessage, oversizeMessage)34 ),35 row(36 "when name is blank",37 "name",38 BeverageWithoutId(blankString),39 listOf(blankMessage)40 ),41 row(42 "when name has more than 255 characters",43 "name",44 BeverageWithoutId(oversizeString),45 listOf(oversizeMessage)46 ),47 row(48 "when settings key is empty",49 "settings<K>[$emptyString].<map key>",50 BeverageWithoutId(validName, mapOf(emptyString to "value")),51 listOf(blankMessage, oversizeMessage)52 ),53 row(54 "when settings key is blank",55 "settings<K>[$blankString].<map key>",56 BeverageWithoutId(validName, mapOf(blankString to validString)),57 listOf(blankMessage)58 ),59 row(60 "when settings key has more than 255 characters",61 "settings<K>[$oversizeString].<map key>",62 BeverageWithoutId(validName, mapOf(oversizeString to validString)),63 listOf(oversizeMessage)64 ),65 row(66 "when settings value is empty",67 "settings[$validString].<map value>",68 BeverageWithoutId(validName, mapOf(validString to emptyString)),69 listOf(blankMessage, oversizeMessage)70 ),71 row(72 "when settings value is blank",73 "settings[$validString].<map value>",74 BeverageWithoutId(validName, mapOf(validString to blankString)),75 listOf(blankMessage)76 ),77 row(78 "when settings value has more than 255 characters",79 "settings[$validString].<map value>",80 BeverageWithoutId(validName, mapOf(validString to oversizeString)),81 listOf(oversizeMessage)82 ),83 row(84 "when settings has more than 5 elements",85 "settings",86 BeverageWithoutId(87 validName,88 listOf("1", "2", "3", "4", "5", "6").associateWith { it }89 ),90 listOf("size must be between 0 and 5")91 )92 ).map { (93 context: String,94 field: String,95 invalidBeverageWithoutId: BeverageWithoutId,96 expectedErrors: List<String>97 ) ->98 describe(context) {99 it("returns error messages: $expectedErrors") {100 val validationErrors: ValidationErrors = BeverageWithoutIdValidator101 .validate(invalidBeverageWithoutId)102 validationErrors.apply {103 shouldNotBeEmpty()104 shouldHaveSize(1)105 shouldContainKey(field)106 }107 val actualErrors: List<String> = validationErrors[field]!!108 actualErrors.shouldContainExactlyInAnyOrder(expectedErrors)109 }110 }111 }112 }113 }114})...

Full Screen

Full Screen

QueryTest.kt

Source:QueryTest.kt Github

copy

Full Screen

1package com.nuglif.kuri2import io.kotest.assertions.assertSoftly3import io.kotest.matchers.maps.beEmpty4import io.kotest.matchers.maps.haveKey5import io.kotest.matchers.maps.haveSize6import io.kotest.matchers.maps.shouldContain7import io.kotest.matchers.should8import io.kotest.matchers.shouldBe9import io.kotest.matchers.string.shouldBeEmpty10import kotlin.test.Test11class ToParametersTest {12 @Test13 fun givenEmptyQuery_thenReturnEmptyMap() {14 "".asQuery().toParameters() should beEmpty()15 }16 @Test17 fun givenQueryWithoutVariableSeparator_thenReturnSingleElement() {18 "someVariable=someValue".asQuery().toParameters() should haveSize(1)19 }20 @Test21 fun givenQueryWithoutValueSeparator_thenReturnElementMappedToEmptyString() {22 val result = "someVariable&someOtherValue".asQuery().toParameters()23 assertSoftly {24 result should haveSize(2)25 result shouldContain ("someVariable" to "")26 result shouldContain ("someOtherValue" to "")27 }28 }29 @Test30 fun givenQueryCustomSeparators_thenReturnElementMappedToProperValue() {31 val subject = "someVariable->someValue<>someOtherVariable>someOtherValue><someThirdVariable=>someThirdValue"32 val result = subject.asQuery().toParameters(33 variableSeparator = "<>|><".toRegex(),34 valueSeparator = "[-=]?>".toRegex(),35 )36 assertSoftly {37 result should haveSize(3)38 result shouldContain ("someVariable" to "someValue")39 result shouldContain ("someOtherVariable" to "someOtherValue")40 result shouldContain ("someThirdVariable" to "someThirdValue")41 }42 }43}44class ToRawTest {45 @Test46 fun givenEmptyMap_thenReturnEmptyQuery() {47 emptyMap<String, String>().asQuery().raw.value.shouldBeEmpty()48 }49 @Test50 fun givenMap_thenReturnEachEntryJoined() {51 mapOf("a" to "1", "b" to "2", "" to "emptyKey", "emptyVariable" to "")52 .asQuery()53 .raw54 .value shouldBe "a=1&b=2&=emptyKey&emptyVariable="55 }56}...

Full Screen

Full Screen

CommandLineParserTest.kt

Source:CommandLineParserTest.kt Github

copy

Full Screen

1package dev.nohus.autokonfig2import dev.nohus.autokonfig.utils.CommandLineParser3import io.kotest.core.spec.style.FreeSpec4import io.kotest.matchers.maps.shouldBeEmpty5import io.kotest.matchers.maps.shouldContainExactly6/**7 * Created by Marcin Wisniowski (Nohus) on 06/01/2020.8 */9class CommandLineParserTest : FreeSpec({10 "parses values" {11 val map = CommandLineParser().parse(arrayOf("-a", "b", "--cfg", "d", "-g", "fg"))12 map shouldContainExactly mapOf(13 "a" to "b",14 "cfg" to "d",15 "g" to "fg"16 )17 }18 "parses flags" {19 val map = CommandLineParser().parse(arrayOf("-a", "b", "-c", "--test"))20 map shouldContainExactly mapOf(21 "a" to "b",22 "c" to null,23 "test" to null24 )25 }26 "parses empty command line" {27 val map = CommandLineParser().parse(arrayOf())28 map.shouldBeEmpty()29 }30 "ignores values without keys" {31 val map = CommandLineParser().parse(arrayOf("-a", "foo", "bar", "--foo", "bar", "baz"))32 map shouldContainExactly mapOf(33 "a" to "foo",34 "foo" to "bar"35 )36 }37 "parses quoted values" {38 val map = CommandLineParser().parse(39 arrayOf("--a", "1", "2", "3", "--quoted", "this is quoted")40 )41 map shouldContainExactly mapOf(42 "a" to "1",43 "quoted" to "this is quoted"44 )45 }46})...

Full Screen

Full Screen

Map.shouldBeEmpty

Using AI Code Generation

copy

Full Screen

1val map = mapOf("a" to 1, "b" to 2)2map.shouldBeEmpty()3val map = mapOf("a" to 1, "b" to 2)4map.shouldContain("a" to 1)5val map = mapOf("a" to 1, "b" to 2)6map.shouldContainAll("a" to 1, "b" to 2)7val map = mapOf("a" to 1, "b" to 2)8map.shouldContainKey("a")9val map = mapOf("a" to 1, "b" to 2)10map.shouldContainKeys("a", "b")11val map = mapOf("a" to 1, "b" to 2)12map.shouldContainValue(1)13val map = mapOf("a" to 1, "b" to 2)14map.shouldContainValues(1, 2)15val map = mapOf("a" to 1, "b" to 2)16map.shouldHaveSize(2)17val map = mapOf("a" to 1, "b" to 2)18map.shouldNotBeEmpty()19val map = mapOf("a" to 1, "b" to 2)20map.shouldNotContain("a" to 3)21val map = mapOf("

Full Screen

Full Screen

Map.shouldBeEmpty

Using AI Code Generation

copy

Full Screen

1 should("should be empty") {2 val map = mapOf(1 to "one", 2 to "two")3 map.shouldBeEmpty()4 }5 should("should not be empty") {6 val map = mapOf(1 to "one", 2 to "two")7 map.shouldNotBeEmpty()8 }9 should("should contain a key") {10 val map = mapOf(1 to "one", 2 to "two")11 }12 should("should not contain a key") {13 val map = mapOf(1 to "one", 2 to "two")14 }15 should("should contain a key and value") {16 val map = mapOf(1 to "one", 2 to "two")17 }18 should("should not contain a key and value") {19 val map = mapOf(1 to "one", 2 to "two")20 }21 should("should contain a key") {22 val map = mapOf(1 to "one", 2 to "two")23 map.shouldContainKey(1)24 }25 should("should not contain a key") {26 val map = mapOf(1 to "one", 2 to "two")27 map.shouldNotContainKey(3)28 }29 should("should contain a value") {

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful