Detailed Notes
Welcome, if you are a tester or developer interested in mobile application automation testing or are new to test automation tools than you defiantly need to check out TestProject. However, if you are not familiar with this tool that's OK. In Mobile Testing With Test Project we cover all the basics necessary to start mobile testing in Test Project 2.0.
TestProject is a community driven tool and has a free forever plan that is fully featured and that you can get started with in moments. In addition they have a lot of documentation that will help you with all the details you need to use TestProject to create effective test automation that your whole team can use.
Before you begin you will need to:
First, go back to the previous video on Test Project A Review of Version 2.0 and watch the section on setup. In addition, you will need to start the Test Project Agent so that Test Project can record against you local simulators and mobile devices. However, depending on your mobile device will determine what you will need to install and set up next. At this point, you will need Android Studio for Android development, Xcode / iOS Simulator for iOS, or both if you are going to be testing on both types of devices. Finally, if you plan on running your mobile tests out side of test project in a then you will need to export your tests to code. As a result you will need to have an IDE like Eclipse and run them using Appium
Transcript Text
[Music] so it gives us two files here we have a demo android app and a generate utils so the generated utils is just our keys this is how it loads any predefined data that you may have exported with your project since we didn't have any we don't have any of those files so this utility is there but not really used then we have our demo android app this is the meat of everything if you look it looks just like a selenium project or a test ng or unit test project with selenium so we have to set up our driver we execute we get our driver we tear down once we're finished we provide the parameters which is where that utility file comes in and then we get the browser capabilities so they have a git capabilities method so we can actually if this was a browser we would do our browser configuration there since this is android we do the same thing we set up the different emulators things so we say oh our platform is android what is our emulator since we're not really doing a browser we leave the browser name blank but here we have to actually set the package name and activities this looks very similar if you go back to any of the selenium classes i've talked about for testing this looks just like a test ng project but it's happy so we have our display name demo android setup so here's our android key it's registered to me we do our execute so we pass in the provided parameters we get our results so we set that start the results as false and they get defined as true at the end so we have our pause times we have driver ready app and so on now i will try to run this i had some issues with this before because i don't quite have appium configured correctly on my machine yet but we will give this oral so we'll try to run this as a unit test still trying to load only recently was i able to get android running on my mac i have the new m1 mac so they just came out with the latest api build so we can actually run the emulators now on this device and the problem i'm running into now is appium isn't quite configured right on my device to actually interact from code to the emulators so i still have to work on that but that's it so here's your code you can make changes to this you can then load this to any continuous integration project you want like jkins bamboo and run your emulators and you should be good to go we have any questions hey there michael i was just a little curious on uh you probably covered this and i just missed it in the meeting or missed the meeting um you know you selenium versus uh test ng versus test project i'm sure they just have their strengths and weaknesses which one do you prefer maybe they're covering different use cases for you okay so you're looking for the differences between test project test ng selenium uh and like this selenium id the different flavors for testing okay so first of all test project is definitely more heavily geared towards like manual ui emulator driven testing that's pretty much what test project is you basically you go in there you set up your tests then you can kick off your tests and run them all through their emulators through their containers with that being said they've added the coding piece so you can now run offline and export everything so now you have that more continuous integration type model that you could do with your types of testing with appium it's pretty neat now if you export their web tests they actually export the web test using junit and selenium webdriver so you really can't get away from selenium webdriver if you're trying to run things from code however with that being said the selenium ide tool to me is inferior to what test project provides because test project actually gives you that self-healing that ai feature so that is huge when it comes from a testing perspective when you're trying to record scripts because your apps are changing you know a lot of times when you're testing stuff it's in flux it's still being developed so what you run into is oh your test works today the one they do to deploy tomorrow it breaks now you have to go in and you have to troubleshoot find the new id uh find the new button whatever well with selenium id you're gonna have to go do all that manually you're gonna have to walk through the steps see where it fails fix it by either re-recording it or fixing the ids with test project you just run the test if it identifies something changes it will give you that little pop-up and give you the option to select a new way of looking it up like new xpath new id new button new component and then you save your test and you're done so that from the record and playback perspective test project is hands down the best tool i've seen yet from a continuous integration option what if you're doing mobile testing when you export your code everything they do they export to june which is fine except junit is a little limited on some of the things that you can do as far as it's its primary role is unit testing whereas test ng allows you to do a lot of your like regression testing your integration testing like you can actually start doing the different layers of testing from test ng you can you just have to set it up and configure it so tess ng is more robust as far as a testing framework from a coding perspective so anything you export from test project to code i would recommend once you get working as junit port it into test ng and then set it up for more continuous integration more robust testing regression testing and then deploy to something like jenkins or bamboo does that answer your question yes sir yes sir and actually added some nuance to it i was thinking um to myself i'm not sure if you can hear me let's take it to myself around the um um was it clicking click and recording such but you you added the nuance that selenium is going to allow you to then take that to code and do the continuous uh integration and delivery so really nice really nice appreciate the answer great yeah and definitely and that's kind of what i've learned in the last seven eight years of doing this with testing i mean i've looked at almost every tool out there there's still a handful i'm not overly familiar with like i have messed around with cucumber and well it's useful i think it is completely bloated with the allowed uh with what it is required to do all the setup and your struts and stubs that you have to do to actually get to the point where you write your tests where the selenium framework that i've been kind of showing that i've kind of built up over time it eliminates most of that that's what that test generator tool is that i have but with that said there's other things out there like protractor you know um you got other unit tests uh and plugins now for visual code so there are other things out there but still a lot of them are in their infancy so be careful with that it's like test project when i first looked at it when it was version one it was interesting i like the concept and i like the ideas but at its time it was very inferior to what it is today uh what it is today if you take test project and you take like i want to say it's catalin which is the test gui tool open source tool you can download and record your tests that i've shown in the past not catalan which is uh i i get these confused because they're so closely named not the google language but the test tool uh it's either catalan or kettle on and that is like an eclipse type tool that is record playback it gives you a little bit more code you can kind of structure it a little bit more there and build out your test cases and kind of a little bit more along the lines of like what soap ui did but from more of a record playback kind of perspective so they actually embed what it looks like the selenium ide within their test tool well that's all fun and games and all great it still requires a lot of user interaction with the interface to get to basically build your test to run your tests to manage your tests where if you export it to a good test framework in code it's very quickly if you separate those layers if you do it right like i've shown where if you separate all your test logic to a test portion of your framework and all the basically the uh interfacing with the application for testing to the other part of the framework now the two can work in parallel so you can go tweak the framework to work with the application as changes happen without impacting the tests and you can continue to write tests without needing to worry about the framework you just use the framework um the integration points as you need them so it's kind of a best of both worlds but it depends on your environment if you're dealing with a small like a very small mobile app or very small web app you don't need to go to that extreme just use a record playback tool do a few things get get up and running and be done but if you have a larger test suite you know with maybe like 10 15 20 customers you have maybe five six seven integration points within your application you may have data sets that you need to test then yes definitely go from the simpler testing to a more advanced framework like test ng selenium or you know whatever flavor you need for your testing stuff good stuff appreciate that good question thank you anyone else okay hearing none i'd like to thank everyone for their time today if you'd like to discuss any of these topics further you can reach us on info at developernerd.com we also have a contact us page on developernerd.com you can find our videos on youtube just google developer nerd and we also have our videos on vimeo at vimeo.com developer nerd we also have podcasts on most podcasts applications like spotify ipod on mac just check us out search for developer our goal is making every developer better have a great day you
Transcript Segments
[Music]
so it gives us
two files here we have a demo android
app and a generate utils
so the generated utils
is just our keys this is how it loads
any predefined data that you may have
exported with your project
since we didn't have any we don't have
any of those files so this utility is
there but not really used
then we have our demo android app
this is the meat of everything
if you look it looks just like a
selenium project or a
test ng or unit test project with
selenium so we have to set up our driver
we execute we get our driver we tear
down
once we're finished we provide the
parameters which is where that utility
file comes in and then we get the
browser capabilities so they have a git
capabilities method so we can actually
if this was a browser we would do our
browser configuration there
since this is android
we do the same thing we set up the
different emulators things so we say oh
our platform is android what is our
emulator
since we're not really doing a browser
we leave the browser name blank but here
we have to actually set the package name
and activities
this looks very similar if you go back
to any of the selenium classes i've
talked about for testing
this looks just like a test ng project
but it's happy so we have our display
name demo android
setup so here's our android key
it's registered to me
we do our execute so we pass in the
provided parameters
we get our results so we set that start
the results as false and they get
defined as true at the end
so we have our pause times
we have driver ready app and so on now i
will try to run this i had some issues
with this before
because i don't quite have appium
configured correctly on my machine yet
but we will give this oral so we'll try
to run this as a unit test
still trying to load
only recently was i able to get android
running on my mac i have the new m1 mac
so
they just came out with the latest api
build so we can actually run the
emulators now on this device
and the problem i'm running into now is
appium isn't quite configured right on
my device to actually interact from code
to the
emulators so i still have to work on
that
but that's it so here's your code you
can make changes to this you can then
load this to any continuous integration
project you want like jkins bamboo
and run your emulators and you should be
good to go
we have any questions
hey there michael i was just a little
curious on uh you probably covered this
and i just missed it in the meeting or
missed the meeting um you know you
selenium versus uh test ng versus test
project
i'm sure they just have their strengths
and weaknesses which one do you prefer
maybe they're covering different use
cases for you
okay so you're looking for the
differences between test project test ng
selenium uh
and like this selenium id the different
flavors for testing
okay
so
first of all test project is
definitely more heavily geared towards
like manual ui emulator driven testing
that's pretty much what test project is
you basically you go in there you set up
your tests then you can kick off your
tests and run them all through their
emulators through their containers
with that being said they've added the
coding piece so you can now run offline
and export everything so now you have
that more continuous integration type
model that you could do with your types
of testing
with appium it's pretty neat now if you
export their web tests
they actually export the web test using
junit and selenium webdriver so you
really can't get away from selenium
webdriver if you're trying to run things
from code
however with that being said the
selenium ide tool
to me
is inferior to what test project
provides
because test project actually gives you
that self-healing that ai feature so
that is huge when it comes from a
testing perspective when you're trying
to record scripts
because
your apps are changing you know
a lot of times when you're testing stuff
it's in flux it's still being developed
so
what you run into is oh your test works
today the one they do to deploy tomorrow
it breaks now you have to go in and you
have to troubleshoot find the new id
uh find the new button whatever
well with selenium id you're gonna have
to go do all that manually you're gonna
have to walk through the steps see where
it fails fix it by either re-recording
it or fixing the ids
with test project you just run the test
if it identifies something changes it
will give you that little pop-up and
give you the option to select a
new way of looking it up like new xpath
new id new button new component
and then you save your test and you're
done so that from the
record and playback perspective test
project is hands down
the best tool i've seen yet
from a continuous integration option
what if you're doing mobile testing
when you export your code
everything they do they export to june
which is fine except junit
is a little limited on some of the
things that you can do as far as
it's
its primary role is unit testing
whereas test ng allows you to do a lot
of your like regression testing your
integration testing like you can
actually start doing the different
layers of testing from test ng you can
you just have to set it up and configure
it so tess ng is more robust as far as a
testing framework
from a coding perspective so anything
you export from test project to code
i would recommend once you get working
as junit port it into test ng and then
set it up for more continuous
integration more robust testing
regression testing and then deploy to
something like jenkins or bamboo
does that answer your question yes sir
yes sir and actually added some nuance
to it i
was
thinking um to myself i'm not sure if
you can hear me let's take it to myself
around the um um
was it clicking click and recording such
but you
you added the nuance that selenium is
going to allow you to then take that to
code and do the continuous uh
integration and delivery so
really nice really nice appreciate the
answer great
yeah and definitely and
that's kind of what i've learned in the
last seven eight years of doing this
with testing i mean i've looked at
almost every tool out there
there's still a handful i'm not overly
familiar with
like i have messed around with cucumber
and well it's useful i think it is
completely bloated with the allowed uh
with what it is required to do all the
setup and your
struts and stubs that you have to do to
actually get to the point where you
write your tests
where
the selenium framework that i've been
kind of showing that i've kind of
built up over time it eliminates most of
that that's what that test generator
tool is that i have
but with that said there's other things
out there like protractor
you know um you got
other unit tests uh and plugins now for
visual code so there are other things
out there
but still a lot of them are in their
infancy so be careful with that it's
like test project when i first looked at
it when it was version one
it was interesting i like the concept
and i like the ideas but at its time it
was very inferior to what it is today
uh what it is today if you take test
project and you take like i want to say
it's catalin
which is the
test gui tool open source tool you can
download and record your tests that i've
shown in the past
not catalan which is uh i i get these
confused because they're so closely
named not the google
language but the test tool uh it's
either catalan or kettle on
and that is like an eclipse type tool
that is record playback it gives you a
little bit more code you can kind of
structure it a little bit more there
and build out your test cases and kind
of a little bit more
along the lines of like what soap ui did
but from more of a record playback kind
of perspective so they actually embed
what it looks like the selenium ide
within their test tool well that's all
fun and games and all great it still
requires a lot of user interaction with
the
interface to get
to basically build your test to run your
tests to manage your tests
where if you export it to a good test
framework in code it's very quickly if
you separate those layers
if you do it right
like i've shown where if you separate
all your test logic to a test
portion of your framework and all the
basically the uh interfacing with the
application for testing to the other
part of the framework now the two can
work in parallel so you can go tweak
the framework to work with the
application as changes happen without
impacting the tests and you can continue
to write tests without needing to worry
about the framework you just use the
framework um the integration points as
you need them
so
it's kind of a best of both worlds but
it depends on your environment if you're
dealing with a small
like a very small mobile app or very
small web app you don't need to go to
that extreme just use a record playback
tool do a few things get get up and
running and be done
but if you have a larger test suite you
know with maybe like 10 15 20 customers
you have maybe five six seven
integration points within your
application you may have data sets that
you need to test then yes definitely go
from the simpler testing to a more
advanced framework like test ng
selenium or you know whatever flavor you
need for your testing
stuff good stuff appreciate that
good question thank you anyone else
okay hearing none
i'd like to thank everyone for their
time today if you'd like to discuss any
of these topics further you can reach us
on
info at developernerd.com
we also have a contact us page on
developernerd.com
you can find our videos on youtube just
google developer nerd and we also have
our videos on vimeo at vimeo.com
developer nerd we also have podcasts on
most podcasts
applications like spotify
ipod on mac just check us out
search for developer our goal is making
every developer better have a great day
you