WiFiAnalyzer is an Android application for analyzing WiFi networks. It helps users:
- Identify nearby Access Points
- Graph channel signal strength
- Analyze Wi-Fi networks to rate channels
- Support 2.4 GHz, 5 GHz and 6 GHz Wi-Fi bands
- Export access point details
Important: WiFiAnalyzer is NOT a Wi-Fi password cracking or phishing tool.
| Component | Technology |
|---|---|
| Language | Kotlin |
| Platform | Android |
| Build Tool | Gradle |
| Testing | JUnit, Mockito, Robolectric, Espresso |
| Code Style | ktlint |
| License | GNU General Public License v3.0 (GPLv3) |
app/src/main/kotlin/ # Main application source code
app/src/test/kotlin/ # Unit tests
app/src/androidTest/kotlin/ # Android instrumentation tests
All source files must include the GPLv3 license header:
/*
* WiFiAnalyzer
* Copyright (C) 2015 - {current_year} VREM Software Development <VREMSoftwareDevelopment@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/- Use descriptive names for classes, methods, and variables
- Follow Kotlin naming conventions: camelCase for variables/methods, PascalCase for classes
Use ktlint for code formatting:
- Check:
./gradlew ktlintCheck - Format:
./gradlew ktlintFormat
All new features and bug fixes MUST include unit tests.
Test files use several patterns, including but not limited to:
[ClassName]Test.kt[ClassName]InstrumentedTest.kt[ClassName]IntegrationTest.kt[ClassName]ParameterizedTest.kt[ClassName]TestUtil.kt
Use the pattern that best describes the test's purpose. Document any deviations from these patterns in your code or pull request to maintain clarity.
@Test
fun shouldReturnCorrectVersionNumber() {
// Arrange: Set up test data and mocks
// Act: Execute the code being tested
// Assert: Verify the results
}// Example imports for test files:
import org.mockito.kotlin.mock
import org.mockito.kotlin.verify
import org.mockito.kotlin.whenever// Example imports for assertions:
import org.assertj.core.api.Assertions.assertThat
assertThat(actual).isEqualTo(expected)
assertThat(actual).isTrue
assertThat(actual).isNotNull()Test teardown pattern:
@After
fun tearDown() {
verifyNoMoreInteractions(dependency1, dependency2)
}Robolectric for Android components (use RobolectricUtil helper):
import com.vrem.wifianalyzer.RobolectricUtil
private val mainActivity = RobolectricUtil.INSTANCE.activity
// For fragments:
RobolectricUtil.INSTANCE.startFragment(fragment)- Instrumentation test files are located in
app/src/androidTest/kotlin/. - File names typically follow the pattern
[ClassName]InstrumentedTest.kt. - Use the
@RunWith(AndroidJUnit4::class)annotation for instrumentation tests. - Access UI components using Espresso or Robolectric as appropriate.
- Example instrumentation test structure:
@RunWith(AndroidJUnit4::class)
class MainActivityInstrumentedTest {
@Test
fun shouldDisplayMainScreen() {
// Arrange: Launch activity
// Act: Interact with UI
// Assert: Verify UI state
}
}| Task | Command |
|---|---|
| Check code style | ./gradlew ktlintCheck |
| Format code | ./gradlew ktlintFormat |
| Run lint | ./gradlew lintDebug |
| Run unit tests | ./gradlew testDebugUnitTest |
| Run tests with coverage | ./gradlew jacocoTestCoverageVerification |
| Run instrumented tests | ./gradlew connectedDebugAndroidTest |
- No Data Collection: WiFiAnalyzer does not collect any personal/device information
- No Internet: The app does not require internet access
- Minimal Permissions: Use only necessary Android permissions
- No Secrets: Never commit API keys, passwords, or other secrets